Menu

#118 Unable to build a pure serial implementation

v3.70+
open
nobody
None
5
2021-04-07
2021-03-29
Anonymous
No

hi

Trying to produce a pure serial implementation choosing 0 here

0) the standard serial implementation ?

it seems to always produce a parallel openmp code so any serial program linked to the lib has to be compiled using -fopenmp

libsharp is by default compiled using .fopenmp I tried to force a serial implementation of that (my idea was to have a serial library as a prerequisite and then produce a serial library) , but it appears that the fopenp flag is still there

I am using gfortran
GNU Fortran (Debian 10.2.1-6) 10.2.1 20210110
and gcc
gcc (Debian 10.2.1-6) 10.2.1 20210110

Discussion

  • Martin Reinecke

    Martin Reinecke - 2021-03-29

    Hmm, looks like the "configure" call to libsharp (line 611 in hpxconfig_functions.sh) should get an additional "--disable-openmp" in the serial case. Not sure how to achieve this though ...

     
  • Anonymous

    Anonymous - 2021-03-29

    I didn't dig through the issue but:
    when I compile the f90 library there is -fopenmp in the gfortran compiler flags (and so any pure serial program to be linked to libhealpix has to be compiled with -fopenmp).

    I guessed that it may depend from the fact that the prerequisite libsharp was compiled with -fopenmp (so forcing an openmp flag to any library depending on libsharp) but that was not the case

     
  • Eric Hivon

    Eric Hivon - 2021-04-05

    Hi,
    if you want to compile a 'serial' HEALPix free of openmp, you will have to set by hand various flags.
    If you are under bash or similar, you could try
    SHARP_COPT='-O3 -ffast-math -march=native' F_PARAL=0 CXXFLAGS='-O3' ./configure --auto=f90,cxx
    which will remove openmp from libsharp and Healpix/F90, but maybe not from Healpix/C++

     
    • Anonymous

      Anonymous - 2021-04-07

      Thanks Eric!

       

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB