Re: gfortran, OpenMP and static linking

2021-04-04 Thread Harald Anlauf via Fortran
Hi Bernhard, > $ gfortran -o omp -fopenmp omp.f90 -static -Wl,--whole-archive -lpthread > -Wl,--no-whole-archive && OMP_NUM_THREADS=2 ./omp that does indeed do the trick! As suggested in your other mail, I should ask Jakub for his opinion. (Statically compiling/linking on the same machine with

Re: gfortran, OpenMP and static linking

2021-04-04 Thread Bernhard Reutner-Fischer via Fortran
Harald, On Sat, 03 Apr 2021 23:24:52 +0200 Bernhard Reutner-Fischer wrote: > On 3 April 2021 20:55:39 CEST, Harald Anlauf via Fortran > wrote: > >Dear all, > > > >is there a reason that one should not be able to statically link a > >Fortran binary that has been compiled with -fopenmp? > > M

Re: gfortran, OpenMP and static linking

2021-04-03 Thread Bernhard Reutner-Fischer via Fortran
On 3 April 2021 20:55:39 CEST, Harald Anlauf via Fortran wrote: >Dear all, > >is there a reason that one should not be able to statically link a >Fortran binary that has been compiled with -fopenmp? Maybe Jakub knows more on this. Not sure if static linking with glibc is still discouraged (it w