[petsc-dev] ARG_MAX and linking
Pierre Jolivet
pierre.jolivet at enseeiht.fr
Tue Feb 6 08:25:37 CST 2018
Fixed --with-shared-libraries=0
$ /C/Program\ Files/Microsoft\ MPI/Bin/mpiexec.exe -np 4 ./ex2.exe
Norm of error 0.000431284 iterations 8
Looks good, thanks!
> On 6 Feb 2018, at 3:10 PM, Pierre Jolivet <pierre.jolivet at enseeiht.fr> wrote:
>
> I’m on master.
> Thanks, I think this is the way to go, though I’m now seeing a lot of undefined references, like there http://mingw-users.1079350.n2.nabble.com/imp-prefixes-when-linking-td7386007.html <http://mingw-users.1079350.n2.nabble.com/imp-prefixes-when-linking-td7386007.html>
>
>> On 6 Feb 2018, at 2:05 PM, Jed Brown <jed at jedbrown.org <mailto:jed at jedbrown.org>> wrote:
>>
>> What branch are you on? I wonder if this is exacerbated by Scott's
>> "absolute path". You can configure --with-single-library=0 which will
>> link a separate libpetscsys, libpetscvec, etc.
>>
>> There are Cygwin recipes in gmakefile that create argument files that
>> the linker reads as @args. We could use $(file > args, $^) to write
>> them with arbitrarily long command lines.
>>
>> Pierre Jolivet <pierre.jolivet at enseeiht.fr <mailto:pierre.jolivet at enseeiht.fr>> writes:
>>
>>> Hello,
>>> I’m trying to compile PETSc with msys2 and MS MPI.
>>> Everything works out almost flawlessly, except when linking. Indeed, you generate a nice line of
>>> $ wc /tmp/cl
>>> 2 1234 69041 /tmp/cl
>>> 69041 characters, but
>>> $ getconf.exe ARG_MAX
>>> 32000
>>>
>>> Thus, sadly, the make fails with the following error
>>> /usr/bin/sh: /mingw64/bin/gcc: Argument list too long
>>>
>>> Do you know of a work around? Anyway to link the full library as multiple smaller libraries (I think you did that for some version X.Y with X << 3, didn’t you?)?
>>>
>>> Thanks,
>>> Pierre
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20180206/0337e0c8/attachment.html>
More information about the petsc-dev
mailing list