<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class="">My [partial] change is in branch balay/reorg-f90-for-xlf</blockquote><br class=""></div>Satish is this branch pushed? I’d like to send it to the ibm folks to see if it works for them as well. They also added this extra follow up:<div class=""><br class=""></div><div class=""><tt style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><font size="2" class="">The change we did in the source files is to replace all the "use pet*" statements in all the Interface blocks with IMPORT statement.</font></tt><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><tt style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><font size="2" class=""><br class="">The nature of this workaround is to reduce the number of symbols that the compiler have to create, which exceeded the limitation and caused ICE.</font></tt><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><tt style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><font size="2" class=""><br class="">Every USE statement in an interface block opens up the module symbol file and reads all the symbols from it and creates an entity for each symbol in compiler. This is unnecessary when the module already has the same USE statement in the module scope. Instead, users can use IMPORT statement to make the module symbols accessible inside interface face blocks.</font></tt><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><tt style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><font size="2" class=""><br class="">With the change, the compiler would only read the module symbol file once and create one set of symbols where the old code reads the module symbol files as many times as the number of the USE statements in Interface blocks and create that many sets of duplicate symbols. Replacing those USE statements with IMPORT statements also shortens the compile time significantly.</font></tt><br class=""><div class=""><br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Best regards,<br class=""><br class="">Jacob Faibussowitsch<br class="">(Jacob Fai - booss - oh - vitch)<br class="">Cell: (312) 694-3391</div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Mar 3, 2021, at 13:43, Satish Balay via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" class="">petsc-dev@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">The only change I can get working (i.e avoid compile errors) is to split petscvecmod.F90 into 2 source files - but I don't know if this will help with xlf..<br class=""><br class="">My [partial] change is in branch balay/reorg-f90-for-xlf<br class=""><br class="">Satish<br class=""><br class="">On Wed, 3 Mar 2021, Satish Balay via petsc-dev wrote:<br class=""><br class=""><blockquote type="cite" class="">On Wed, 3 Mar 2021, Satish Balay via petsc-dev wrote:<br class=""><br class=""><blockquote type="cite" class="">Sure - once any change works locally [for gcc and xlf]<br class=""><br class="">When I try - I get a bunch of errors.. [yet to digest them.]<br class=""></blockquote><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">Can you please give the following source code workaround a try?<br class="">Since there is already "use petscvecdefdummy" at the module scope, one workaround might be to remove the unnecessary "use petscvecdefdummy" in vecnotequal and vecequals <br class="">and all similar procedures.<br class=""><br class="">For example, the test case has:<br class=""> module petscvecdef<br class=""> use petscvecdefdummy<br class="">...<br class=""> function vecnotequal(A,B)<br class=""> use petscvecdefdummy<br class=""> logical vecnotequal<br class=""> type(tVec), intent(in) :: A,B<br class=""> vecnotequal = (A%v .ne. B%v)<br class=""> end function<br class=""></blockquote></blockquote></blockquote></blockquote></blockquote><br class=""><br class="">Ok - try this suggestion:<br class=""><br class="">diff --git a/src/vec/f90-mod/petscvecmod.F90 b/src/vec/f90-mod/petscvecmod.F90<br class="">index 0c447156b9..81968c7ca1 100644<br class="">--- a/src/vec/f90-mod/petscvecmod.F90<br class="">+++ b/src/vec/f90-mod/petscvecmod.F90<br class="">@@ -77,7 +77,6 @@<br class=""> use petscvecdefdummy<br class=""> interface operator(.ne.)<br class=""> function vecnotequal(A,B)<br class="">- use petscvecdefdummy<br class=""> logical vecnotequal<br class=""> type(tVec), intent(in) :: A,B<br class=""> end function<br class=""><br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class=""></blockquote></blockquote></blockquote></blockquote></blockquote> FC arch-linux-c-debug/obj/vec/f90-mod/petscvecmod.o<br class="">/home/balay/petsc/src/vec/f90-mod/petscvecmod.F90:81:22:<br class=""><br class=""> 81 | type(tVec), intent(in) :: A,B<br class=""> | 1<br class="">Error: Derived type ‘tvec’ at (1) is being used before it is defined<br class="">/home/balay/petsc/include/../src/vec/f90-mod/ftn-auto-interfaces/petscis.h90:2:10:<br class=""><br class=""> 2 | use petscvecdef<br class=""> | 1<br class="">Fatal Error: Cannot open module file ‘petscvecdef.mod’ for reading at (1): No such file or directory<br class=""><<<<<<<br class=""><br class="">Satish<br class=""></blockquote></div></div></blockquote></div><br class=""></div></div></body></html>