Giter Site home page Giter Site logo

bsc-pm / mcxx Goto Github PK

View Code? Open in Web Editor NEW
69.0 11.0 23.0 41.21 MB

Mercurium is a C/C++/Fortran source-to-source compilation infrastructure aimed at fast prototyping developed by the Programming Models group at the Barcelona Supercomputing Center

License: GNU Lesser General Public License v3.0

Makefile 0.62% Shell 0.31% M4 0.59% C 55.20% Python 1.17% C++ 37.35% Lex 0.31% Yacc 0.22% Fortran 4.23% Cuda 0.01%
source-to-source compiler openmp ompss

mcxx's People

Contributors

afilguer avatar dave96 avatar ergus avatar florentinosainz avatar jbelloncastro avatar jmperez-bsc avatar julianmorillo avatar k0gamsx avatar lucashmorais avatar metbosch avatar mikaop avatar omargw avatar orestiskor avatar paulmcarpenter avatar rofirrim avatar smateo avatar sroyuela avatar vlopezh avatar xavim avatar xteruel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mcxx's Issues

mfc compiler error

The following code fails with mfc but works with gfortran. As noted by @sergimateo, If you move the public statement after the enum then mfc is happy.

module global_parameters_mod

  use iso_c_binding
  implicit none

  public :: FE
  enum, bind(c)
     enumerator :: FE
  end enum
  
end module global_parameters_mod

Compilation with make and dependency files

Hello,
I am trying to compile the code Smilei (https://github.com/SmileiPIC/Smilei) with Mercurium to use OmpSs-2, but the generation of dependencies between the source files seems to have a problem.

Trying to imitate the compiling command in Issue #39 (I_MPI_CXX=mcxx MPICH_CXX=mcxx OMPI_CXX=mcxx mpiicpc -O3 -std=c++11 -o test_OmpSs-2 --ompss-2 test_OpenMP_OmpSs-2.cpp), for the moment I have modified the makefile to force some variables to the necessary values: makefile.txt

Since the code has many source files, the makefile first creates dependency files *.d, then the sources are compiled into *.o files used to compile the main file. However at the phase of dependency generation this error occurs for each source file:

make -n config="ompss2task"

Checking dependencies for src/Tools/H5.cpp
mcxx: parameter '-MFbuild/src/Tools/H5.d' ignored
mcxx: parameter '-MTbuild/src/Tools/H5.d build/src/Tools/H5.o' ignored

Without these flags the dependency files *.d and the *.o files are not created in the build directory as they should, so the compiled commands seem to have the correct flags and wrappers (except for the -MF and -MT flags), but do not generate the files needed by the main file and the executable is not created.

An example of the resulting compiling commands:

I_MPI_CXX=mcxx MPICH_CXX=mcxx OMPI_CXX=mcxx mpic++ -D_OMPSS_2 --ompss-2 -Wno-reorder -D__VERSION=\"4.6-643-gcf70b8c22-master\" -D_VECTO -std=c++11 -Wall  -I/gpfs/users/massimof/Code_Smilei/smilei_eventify/hdf5-1.10.7/build//include -Isrc -Isrc/Params -Isrc/ElectroMagnSolver -Isrc/ElectroMagn -Isrc/ElectroMagnBC -Isrc/Particles -Isrc/Radiation -Isrc/Ionization -Isrc/Interpolator -Isrc/Collisions -Isrc/Merging -Isrc/Tools -Isrc/Python -Isrc/Projector -Isrc/DomainDecomposition -Isrc/MovWindow -Isrc/Profiles -Isrc/picsar_interface -Isrc/Checkpoint -Isrc/Pusher -Isrc/Field -Isrc/ParticleBC -Isrc/MultiphotonBreitWheeler -Isrc/SmileiMPI -Isrc/Species -Isrc/Diagnostic -Isrc/ParticleInjector -Isrc/Patch -Ibuild/src/Python -I/gpfs/softs/languages/python/3.6.8/include/python3.6m -I/gpfs/softs/languages/python/3.6.8/include/python3.6m -I/gpfs/users/massimof/.local/lib/python3.6/site-packages/numpy/core/include -DSMILEI_USE_NUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -O3 -g    -c src/Checkpoint/Checkpoint.cpp -o build/src/Checkpoint/Checkpoint.o

With mcxx --help this message is given:

Compatibility parameters:
...
  -MF <file>
...
  -MT <target>
...
Parameters above are passed verbatim to preprocessor, compiler and
linker. Some of them may disable compilation and linking to be
compatible with gcc and applications expecting gcc behaviour.

Does it mean that these flags cannot be used? In this case, is there another way to compile a multi-source code easily with the make utility?

mfc select type is not supported

  SUBROUTINE set_field(fld, val)
    implicit none
    type(field_type), INTENT(out) :: fld
    real, INTENT(in) :: val

    select type(fld)
    type is (r2d_field)
       fld%data = val
    class default
    end select

  END SUBROUTINE set_field
tmp.f90:6:5: sorry: SELECT TYPE statement not supported

mfc kind statement error

mfc gives an error for the following code but gfortran is happy ...

module argument_mod

use iso_c_binding
implicit none

enum, bind(c) 
   enumerator :: FE
end enum

integer(kind(FE)) :: stencil=0

end module argument_mod
argument_mod.F90:10:9: error: invalid entity 'kind' for subscript expression
argument_mod.F90:10:14: error: 'fe' cannot be an argument
argument_mod.F90:10:9: error: 'kind' is not a derived-type-name
argument_mod.F90:10:9: warning: could not compute KIND specifier, assuming 4

mfc error with public enumerated types

module global_parameters_mod

  use iso_c_binding
  implicit none
  
  private

  enum, bind(c)
     enumerator :: CELLS=2, EDGES=1, VERTICES=0
  end enum
  public :: CELLS, EDGES, VERTICES
  
end module global_parameters_mod
module kernel_mod
use global_parameters_mod
implicit none
private

public CELLS, EDGES, VERTICES

end module kernel_mod
mfc_kernel_mod.f90:5:19:

     PUBLIC :: cells, edges, vertices
                   1
Error: Symbol ‘cells’ at (1) has no IMPLICIT type
mfc_kernel_mod.f90:5:26:

     PUBLIC :: cells, edges, vertices
                          1
Error: Symbol ‘edges’ at (1) has no IMPLICIT type
mfc_kernel_mod.f90:5:36:

     PUBLIC :: cells, edges, vertices
                                    1
Error: Symbol ‘vertices’ at (1) has no IMPLICIT type

Compilation with OmpSs-2 and OpenMP

Hello,
I was exploring the compatibility with OpenMP with a simple test. I know that OpenMP compatibility is not fully supported, nor it is guaranteed in any case, but I am wondering if I am making some mistakes in the compilation.

My test:

#include <stdio.h>
#include <iostream>
#include <omp.h>
using namespace std;

int main(int argc, char *argv[])
{
    #pragma omp for 
    for (int i=0; i<10; i++)
    {
        cout<<"Hello omp, iteration "<<i<<"\n"<<endl;
    }

    for (int i=0; i<10; i++)
    {
        #pragma oss task firstprivate(i)
        {
            #pragma oss critical
            {
                cout<<"Hello OmpSs-2/, iteration "<<i<<endl;
            }
        }
    }
    return 0;
}

My compilation commands:

export CXX=icpc
export CC=icc
export MERCURIUM=/gpfs/users/massimof/mcxx/install/bin/
export PATH=$MERCURIUM:$PATH
 
I_MPI_CXX=mcxx MPICH_CXX=mcxx OMPI_CXX=mcxx mpiicpc --ompss-2 -O3 -std=c++11 -o test_OpenMP_OmpSs-2 --openmp-compatibility -fopenmp test_OpenMP_OmpSs-2.cpp -lz

In correspondence with the OpenMP pragma, an error occurs: error: this construct is not supported by Nanos6. Using a #pragma omp parallel for yields warning: explicit parallel regions do not have any effect in OmpSs.

Mercurium should have been compiled with OpenMP support:

export MERCURIUM=/gpfs/users/massimof/mcxx/install
export BISON=/gpfs/users/massimof/bison-2.6.5/install/bin/bison
export FLEX=/gpfs/users/massimof/flex-2.6.4/install/bin/flex
export GPERF=/gpfs/users/massimof/gperf-3.1/install/bin/gperf
export NANOSSIX=/gpfs/users/massimof/nanos6/install
export GIT=/gpfs/softs/spack/opt/spack/linux-centos7-cascadelake/gcc-9.2.0/git-2.25.0-lojbmyepxnaay2yotcnyzwwty36rnjyq/bin/git
export NANOSS=/gpfs/users/massimof/ompss-19.06/nanox-0.15/install

./configure BISON=$BISON FLEX=$FLEX GPERF=$GPERF GIT=$GIT --prefix=$MERCURIUM --enable-ompss-2 --with-nanos6=$NANOSSIX --enable-openmp --with-nanox=$NANOSS
make -j 10
make install

In the log file for the compilation of Mercurium it can be read:

checking if enabled OmpSs support in the compiler for Nanos++... no
checking if enabled OpenMP support in the compiler for Nanos++... yes
checking if enabled OmpSs-2 support in the compiler for Nanos6... yes
checking nanos.h usability... yes
checking nanos.h presence... yes
checking for nanos.h... yes
checking whether used installation of Nanos++ has instrumentation support... yes
...
checking nanos6.h usability... yes
checking nanos6.h presence... yes
checking for nanos6.h... yes
checking for nanos6_in_final in -lnanos6... yes

If I try to compile only with OmpSs-2 pragmas, everything works correctly. So, is there something missing in my compilation?

mfc class and self not supported

function get_tmask(self) result(tmask)
  implicit none
  class (grid_type), target, intent(in) :: self
  integer, pointer :: tmask(:,:)
  tmask => self%tmask
  return
end function get_tmask
grid_mod.f90:3:3: error: sorry: CLASS type-specifier not implemented
grid_mod.f90:5:12: error: entity 'self' does not have any IMPLICIT type

No rule to make target 'src/frontend/cxx-asttype.def', needed by 'src/frontend/cxx-asttype.c'. Stop.

Hi I am trying to install Nanos6-Mercurium on Ubuntu 20.04 on WSL2:

I install the dependencies and finally configure with the following:
./configure --prefix=$MERCURIUM --enable-ompss-2 --enable-nanos6-bootstrap

The config files are generated, but the make fails saying:
make: *** No rule to make target 'src/frontend/cxx-asttype.def', needed by 'src/frontend/cxx-asttype.c'. Stop.

As a result, make install also fails.
Can you please help me to understand what could solve this issue?

mfc extend not supported?

I think this internal compiler error is to do with the extend clause

module field_mod

  implicit none

  type, public, extends(field_type) :: r2d_field
     integer :: ntiles
  end type r2d_field
  
end module field_mod
fortran03-buildscope.c:3432(gather_attr_spec_item): Internal compiler error.
fortran03-buildscope.c:3432(gather_attr_spec_item): Please report a bug at [email protected] with preprocessed source if possible
fortran03-buildscope.c:3432(gather_attr_spec_item): Unhandled handler of '(' (AST_ATTR_SPEC)

undefined reference to `Codegen::FortranBase::codegen_type

configured with ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --disable-dependency-tracking --disable-silent-rules --disable-static --docdir=/usr/share/doc/mcxx-2021.06 --htmldir=/usr/share/doc/mcxx-2021.06/html --with-sysroot=/ --libdir=/usr/lib64 --disable-cray-compilers --disable-distcheck-processing --disable-ibm-compilers --disable-intel-compilers --disable-pgi-compilers --disable-mic --disable-mic-testing --disable-nanox-cuda-device --disable-nanox-fpga-device --enable-bison-regeneration --enable-file-regeneration --enable-flex-regeneration --enable-gperf-regeneration --enable-shared --without-intel-omp --without-nanox-mic --without-svml --enable-analysis --disable-gfortran-8-or-greater-array-descriptors --disable-bison-reporting --disable-tl-examples --disable-extrae --enable-nanox-mpi-device --disable-ompss --disable-ompss-2 --enable-nanox-opencl-device --enable-openmp --enable-float128 --enable-int128 --disable-fortran-tests --disable-tl-openmp-gomp --disable-tl-openmp-profile --disable-vectorization --with-mpi=/usr --with-nanox=/usr --without-nanos6 --with-tcl=/usr

/bin/sh ./libtool  --tag=CXX   --mode=link x86_64-pc-linux-gnu-g++ -DLIBMCXXTL_DLL_EXPORT -I ./support/gperf -I ./support/gperf -I ./src/frontend -I ./src/frontend/fortran -I ./src/driver -I ./src/tl -I ./src/tl/codegen/common -I ./lib 
-I ./src/frontend -I ./src/frontend/fortran -I ./src/driver -I ./src/tl -I ./lib -Os -pipe -march=native -avoid-version  -Wl,-rpath,/usr/lib64/mcxx -Wl,-rpath,\$ORIGIN -Wl,-rpath,\$ORIGIN/mcxx -Wl,-z,origin --enable-new-dtags  -Wl,-O1 -
Wl,--as-needed -o src/mcxx_tl/libmcxxtl.la -rpath /usr/lib64 src/mcxx_tl/libmcxxtl_la-cxx-compilerphases.lo ./src/frontend/libmcxx-process.la ./src/frontend/libmcxx.la ./src/tl/libtl.la ./src/tl/codegen/common/libcodegen-common.la ./lib
/libmcxx-utils.la -ldl                                                                                                
libtool: link: x86_64-pc-linux-gnu-g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/crtbeginS.o  src/mcxx_tl/.libs/libmcxxtl_la-cxx-compilerphase
s.o   -Wl,-rpath -Wl,/var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/.libs -Wl,-rpath -Wl,/var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/tl/.libs -Wl,-rpath -Wl,//u
sr/lib/gcc/x86_64-pc-linux-gnu/11.2.0 -Wl,-rpath -Wl,/var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/fortran/.libs -Wl,-rpath -Wl,/var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release
-2021.06/lib/.libs -Wl,-rpath -Wl,/var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/tl/codegen/common/.libs -L/var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/.libs -L/
var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/fortran/.libs -L/var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/lib/.libs -Wl,--as-needed ./src/frontend/.libs/libmcxx-pro
cess.so ./src/frontend/.libs/libmcxx.so -L/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0 ./src/tl/.libs/libtl.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/.libs/libmcxx.so //usr/lib/gcc/x86_64-pc-l
inux-gnu/11.2.0/libquadmath.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/fortran/.libs/libmf03.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/.lib
s/libmcxx-process.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/lib/.libs/libmcxx-utils.so -lsqlite3 ./src/tl/codegen/common/.libs/libcodegen-common.so ./lib/.libs/libmcxx-utils.so -ldl -L/usr/lib/gcc/x86
_64-pc-linux-gnu/11.2.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr
/lib/gcc/x86_64-pc-linux-gnu/11.2.0/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/crtn.o  -Os -march=native -Wl,-rpath -Wl,/usr/lib64/mcxx -Wl,-rpath -Wl,\$ORIGIN -Wl,-rpath -Wl,\$ORIGIN/mcxx -Wl,-z -Wl,origin -Wl,
-O1   -Wl,-soname -Wl,libmcxxtl.so -o src/mcxx_tl/.libs/libmcxxtl.so                         
libtool: link: ( cd "src/mcxx_tl/.libs" && rm -f "libmcxxtl.la" && ln -s "../libmcxxtl.la" "libmcxxtl.la" )
/bin/sh ./libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -std=gnu99 -fexceptions -I./support/gperf -I./support/gperf -I./lib -I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl -I./src/driver -I.
/src/driver/fortran -I./lib -I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl -I./src/driver -I./src/driver/fortran -DPKGDATADIR=\"/usr/share/mcxx\" -Wall -Os -pipe -march=native -Werror=implicit-function-declaration -c -o src/d
river/fortran/libmf03_driver_la-cxx-driver-fortran.lo `test -f 'src/driver/fortran/cxx-driver-fortran.c' || echo './'`src/driver/fortran/cxx-driver-fortran.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -std=gnu99 -fexceptions -I./support/gperf -I./support/gperf -I./lib -I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl -I./src/driver -I./src/driver/fortran -I./lib -
I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl -I./src/driver -I./src/driver/fortran -DPKGDATADIR=\"/usr/share/mcxx\" -Wall -Os -pipe -march=native -Werror=implicit-function-declaration -c src/driver/fortran/cxx-driver-fortran
.c  -fPIC -DPIC -o src/driver/fortran/.libs/libmf03_driver_la-cxx-driver-fortran.o
/bin/sh ./libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -std=gnu99 -fexceptions -I./support/gperf -I./support/gperf -I./lib -I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl -I./src/driver -I./src/driver/fortran -I./li
b -I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl -I./src/driver -I./src/driver/fortran -DPKGDATADIR=\"/usr/share/mcxx\" -Wall -Os -pipe -march=native -Werror=implicit-function-declaration  -Wl,-O1 -Wl,--as-needed -o src/drive
r/fortran/libmf03-driver.la  src/driver/fortran/libmf03_driver_la-cxx-driver-fortran.lo   
libtool: link: x86_64-pc-linux-gnu-ar cru src/driver/fortran/.libs/libmf03-driver.a src/driver/fortran/.libs/libmf03_driver_la-cxx-driver-fortran.o 
libtool: link: x86_64-pc-linux-gnu-ranlib src/driver/fortran/.libs/libmf03-driver.a
libtool: link: ( cd "src/driver/fortran/.libs" && rm -f "libmf03-driver.la" && ln -s "../libmf03-driver.la" "libmf03-driver.la" )
/bin/sh ./libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -std=gnu99 -D_GNU_SOURCE -fexceptions -I./lib -I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl -I./lib -I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl 
-DPKGDATADIR=\"/usr/share/mcxx\" -Wall -I./support/gperf -I./support/gperf -I./src/frontend/fortran -I./src/frontend/fortran -I./src/driver -I./src/driver/fortran -I./src/driver -I./src/driver/fortran -Os -pipe -march=native -Werror=imp
licit-function-declaration -Wl,--no-as-needed -Wl,-E -Wl,-rpath,\$ORIGIN/../lib -Wl,-rpath,\$ORIGIN/../lib/mcxx -Wl,-z,origin -Wl,--enable-new-dtags  -Wl,-O1 -Wl,--as-needed -o src/driver/plaincxx src/driver/plaincxx-cxx-configfile.o sr
c/driver/plaincxx-cxx-configoptions.o src/driver/plaincxx-cxx-parameters.o src/driver/plaincxx-cxx-fileextensions.o src/driver/plaincxx-cxx-debugflags.o src/driver/plaincxx-cxx-driver.o src/driver/plaincxx-cxx-driver-utils.o src/driver/
plaincxx-cxx-profile.o src/driver/plaincxx-cxx-configfile-parser.o src/driver/plaincxx-cxx-configfile-lexer.o src/driver/plaincxx-cxx-multifile.o src/driver/plaincxx-cxx-embed.o  ./gnulib/libgnulib.la ./lib/libmcxx-utils.la ./src/fronte
nd/libmcxx-process.la ./src/frontend/libmcxx.la ./src/tl/libtl.la ./src/tl/codegen/common/libcodegen-common.la ./src/tl/codegen/base/cxx/libcodegen-cxx.la ./src/tl/codegen/base/fortran/libcodegen-fortran.la ./src/mcxx_tl/libmcxxtl.la  .
/src/frontend/fortran/libmf03.la ./src/driver/fortran/libmf03-driver.la -lsqlite3  -lquadmath -lm 
libtool: link: x86_64-pc-linux-gnu-gcc -std=gnu99 -D_GNU_SOURCE -fexceptions -I./lib -I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl -I./lib -I./src/frontend -I./src/frontend/fortran -I./src/mcxx_tl -DPKGDATADIR=\"/usr/share/m
cxx\" -Wall -I./support/gperf -I./support/gperf -I./src/frontend/fortran -I./src/frontend/fortran -I./src/driver -I./src/driver/fortran -I./src/driver -I./src/driver/fortran -Os -pipe -march=native -Werror=implicit-function-declaration 
-Wl,-E -Wl,-rpath -Wl,\$ORIGIN/../lib -Wl,-rpath -Wl,\$ORIGIN/../lib/mcxx -Wl,-z -Wl,origin -Wl,--enable-new-dtags -Wl,-O1 -o src/driver/.libs/plaincxx src/driver/plaincxx-cxx-configfile.o src/driver/plaincxx-cxx-configoptions.o src/dri
ver/plaincxx-cxx-parameters.o src/driver/plaincxx-cxx-fileextensions.o src/driver/plaincxx-cxx-debugflags.o src/driver/plaincxx-cxx-driver.o src/driver/plaincxx-cxx-driver-utils.o src/driver/plaincxx-cxx-profile.o src/driver/plaincxx-cx
x-configfile-parser.o src/driver/plaincxx-cxx-configfile-lexer.o src/driver/plaincxx-cxx-multifile.o src/driver/plaincxx-cxx-embed.o  -Wl,--no-as-needed -Wl,--as-needed ./gnulib/.libs/libgnulib.a ./lib/.libs/libmcxx-utils.so ./src/front
end/.libs/libmcxx-process.so ./src/frontend/.libs/libmcxx.so ./src/tl/.libs/libtl.so ./src/tl/codegen/common/.libs/libcodegen-common.so ./src/tl/codegen/base/cxx/.libs/libcodegen-cxx.so ./src/tl/codegen/base/fortran/.libs/libcodegen-for
tran.so ./src/mcxx_tl/.libs/libmcxxtl.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/tl/.libs/libtl.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/.libs/libm
cxx.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/fortran/.libs/libmf03.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/tl/codegen/common/.libs/libcodegen-co
mmon.so -ldl ./src/frontend/fortran/.libs/libmf03.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06/src/frontend/.libs/libmcxx-process.so /var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-202
1.06/lib/.libs/libmcxx-utils.so ./src/driver/fortran/.libs/libmf03-driver.a -lsqlite3 //usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/libquadmath.so -lm -Wl,-rpath -Wl,/usr/lib64/mcxx
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ./src/tl/.libs/libtl.so: undefined reference to `Codegen::FortranBase::codegen_type(TL::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::
allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:7714: src/driver/plaincxx] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06'
make[1]: *** [Makefile:11219: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-cluster/mcxx-2021.06/work/mcxx-github-release-2021.06'
make: *** [Makefile:5825: all] Error 2

test failures

Gentoo's CI had test failures

Failing Tests (99):
    Mercurium :: 01_fortran.dg/success_argument_association_006.f90
    Mercurium :: 01_fortran.dg/success_float_intrinsic.f90
    Mercurium :: 01_fortran.dg/success_function_04.f90
    Mercurium :: 01_fortran.dg/success_intrinsics_03.f90
    Mercurium :: 01_fortran.dg/success_intrinsics_06.f90
    Mercurium :: 01_fortran.dg/success_intrinsics_07.f90
    Mercurium :: 01_fortran.dg/success_intrinsics_09.f90
    Mercurium :: 01_parser.dg/success_202.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_366.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_378.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_381.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_399.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_461.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_468.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_475.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_531.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_627.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_628.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_631.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_634.cpp
    Mercurium :: 02_typecalc_cxx.dg/success_637.cpp
    Mercurium :: 02_typecalc_cxx11.dg/success_085.cpp
    Mercurium :: 02_typecalc_cxx11.dg/success_137.cpp
    Mercurium :: 02_typecalc_cxx11.dg/success_mergesort_01.cpp.bz2
    Mercurium :: 05_torture_cxx_1.dg/success_kratos_datafile_io.cpp.bz2
    Mercurium :: 07_phases_analysis.dg/liveness_01.c
    Mercurium :: 07_phases_analysis.dg/reach_defs_01.cpp
    Mercurium :: 07_phases_analysis.dg/reach_defs_02.cpp
    Mercurium :: 07_phases_analysis.dg/use_def_ipa_06.cpp
    Mercurium :: 07_phases_analysis.dg/use_def_ipa_13.cpp
    Mercurium :: 07_phases_hlt.dg/success_collapse_01.cpp
    Mercurium :: 07_phases_hlt.dg/success_collapse_02.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_01.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_02.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_03.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_04.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_05.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_06.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_07.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_08.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_for_03.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_01.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_02.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_03.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_07.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_08.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_10.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_11.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_12.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_13.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_14.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_15.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_18.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_19.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_new_udr_20.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_no_openmp.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_parallel_01.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_parallel_02.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_parallel_03.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_parallel_04.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_parallel_05.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_01.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_02.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_03.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_04.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_05.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_06.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_08.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_09.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_10.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_15.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_task_16.cpp
    Mercurium :: 07_phases_omp.dg/common/cxx/success_threadprivate_01.cpp
    Mercurium :: 07_phases_omp.dg/common/fortran/success_array_reduction_06.f90
    Mercurium :: 07_phases_omp.dg/common/fortran/success_assumed_shape_01.f90
    Mercurium :: 07_phases_omp.dg/common/fortran/success_atomic_01.f90
    Mercurium :: 07_phases_omp.dg/common/fortran/success_atomic_02.f90
    Mercurium :: 07_phases_omp.dg/common/fortran/success_lastprivate_03.f90
    Mercurium :: 07_phases_omp.dg/common/fortran/success_task_arrays_01.f90
    Mercurium :: 07_phases_ompss.dg/cxx/success_multideps_01.cpp
    Mercurium :: 07_phases_ompss.dg/cxx/success_multideps_02.cpp
    Mercurium :: 07_phases_ompss.dg/cxx/success_task_01.cpp
    Mercurium :: 07_phases_ompss.dg/cxx/success_task_02.cpp
    Mercurium :: 07_phases_ompss.dg/cxx/success_task_07.cpp
    Mercurium :: 07_phases_ompss.dg/cxx/success_task_10.cpp
    Mercurium :: 07_phases_ompss.dg/cxx/success_task_17.cpp
    Mercurium :: 07_phases_ompss.dg/cxx/success_task_21.cpp
    Mercurium :: 07_phases_ompss.dg/cxx/success_task_23.cpp
    Mercurium :: 07_phases_ompss.dg/cxx/success_vla_01.cpp
    Mercurium :: 07_phases_ompss.dg/fortran/success_assumed_shape_01.f90
    Mercurium :: 07_phases_ompss.dg/fortran/success_lastprivate_03.f90
    Mercurium :: 07_phases_ompss.dg/fortran/success_task_array_reduction_01.f90
    Mercurium :: 07_phases_ompss.dg/fortran/success_task_array_reduction_02.f90
    Mercurium :: 07_phases_ompss.dg/fortran/success_task_arrays_03.f90
    Mercurium :: 07_phases_ompss.dg/fortran/success_task_arrays_04.f90
    Mercurium :: 07_phases_ompss.dg/fortran/success_task_arrays_05.f90
    Mercurium :: 07_phases_ompss.dg/fortran/success_task_inside_task_01.f90
    Mercurium :: 07_phases_ompss.dg/fortran/success_task_reduction_02.f90
    Mercurium :: 07_phases_ompss.dg/fortran/success_task_reduction_03.f90

  Expected Passes    : 3158
  Unexpected Failures: 99

See https://bugs.gentoo.org/842807
Foll log: https://bugs.gentoo.org/attachment.cgi?id=776942

missing libiconv

I am trying to compile mcxx from this repository, but make shows this error:

/usr/bin/ld: ./src/frontend/.libs/libmcxx.so: undefined reference to `libiconv'
/usr/bin/ld: ./src/frontend/.libs/libmcxx.so: undefined reference to `libiconv_close'
/usr/bin/ld: ./src/frontend/.libs/libmcxx.so: undefined reference to `libiconv_open'

This error is quite strange since I am giving the path to libiconv with --with-libiconv-prefix=/usr/local/libiconv-1.15, so I believe that this can be an issue.

Compilation with Nanos6 for OmpSs-2

Dear developers,
I wanted to try a simple preliminary test with https://pm.bsc.es/gitlab/ompss-2/examples/dot-product, so I am trying to compile Nano6 and Mercurium to have the mcc file for OmpSs-2.

Following the instructions online (https://pm.bsc.es/ftp/ompss-2/doc/user-guide/OmpSs-2-User-Guide.pdf), I have successfully compiled Nanos6 (cloned from https://github.com/bsc-pm/nanos6) with this compilation script compile_Nanos6.txt . Afterwards, while compiling Mercurium (cloned from https://github.com/bsc-pm/mcxx), I obtain an error:

+ make -j 20
make: *** No rule to make target `src/frontend/cxx-asttype.def', needed by `src/frontend/cxx-asttype.c'.  Stop.
+ make install
make: *** No rule to make target `src/frontend/cxx-asttype.def', needed by `src/frontend/cxx-asttype.c'.  Stop.

Attached is the compilation file for Mercurium
compile_Mercurium.txt
and the log file from its compilation ,
compilation_Mercurium_log.txt
Please do not hesitate to ask me more info or logs to help solving the problem.

Also, the same error occurs if I try to compile without the flag --with-nanos6=... .
When I try to compile Mercurium and Nanosx from tarball on the same machine for OmpSs all seems to work and the mcc file is created.

What do you think it could be the cause of the error?

Thanks in advance for your time.

mfc does not support type bound procedures

type bound procedures fail ...

module grid_mod
  implicit none

  type, public :: grid_type
     integer :: name
   contains
     procedure :: get_tmask

  end type grid_type

end module grid_mod
grid_mod.f90:7:6: sorry: type-bound procedures are not supported

TARGET statement is not handling array-spec correctly

The following valid code

PROGRAM MAIN
    IMPLICIT NONE
    INTEGER  :: Y
    TARGET :: Y(10)

    Y(1) = 3
END PROGRAM MAIN

crashes because when handling the AST_DIMENSION_DECL we try to query the name in the wrong tree in function build_scope_target_stmt

for_each_element(target_decl_list, it)
    {
        AST target_decl = ASTSon1(it);

        AST name = target_decl;

        /* ERROR */ scope_entry_t* entry = get_symbol_for_name(decl_context, name, ASTText(name));


        if (ASTKind(target_decl_list) == AST_DIMENSION_DECL)

mfc error with a constructor

constructors don't seem to be supported ...

module region_mod
  implicit none

  type :: region_type
     integer :: nx
  end type region_type

  interface region_type
     module procedure region_constructor
  end interface region_type

end module region_mod
region_mod.f90:8:13: error: redefining symbol 'region_type'

`error: ‘ICONV_CONST’ undeclared`, maybe a bug in the code?

I'm getting the following build error after the configuration:

  CC       src/frontend/src_frontend_libmcxx_la-cxx-dyninit.lo
  CC       src/frontend/src_frontend_libmcxx_la-cxx-tltype.lo
  CC       src/frontend/src_frontend_libmcxx_la-cxx-exprtype.lo
../src/frontend/cxx-exprtype.c: In function ‘string_literal_type’:
../src/frontend/cxx-exprtype.c:2449:13: error: ‘ICONV_CONST’ undeclared (first use in this function); did you mean ‘CV_CONST’?
             ICONV_CONST char* inbuff = (ICONV_CONST char*)codepoints;
             ^~~~~~~~~~~
             CV_CONST
../src/frontend/cxx-exprtype.c:2449:13: note: each undeclared identifier is reported only once for each function it appears in
../src/frontend/cxx-exprtype.c:2449:25: error: expected ‘;’ before ‘char’
             ICONV_CONST char* inbuff = (ICONV_CONST char*)codepoints;
                         ^~~~
../src/frontend/cxx-exprtype.c:2455:45: error: ‘inbuff’ undeclared (first use in this function); did you mean ‘outbuff’?
             size_t conv_result = iconv(cd, &inbuff, &inbyteslefts, &outbuff, &outbytesleft);
                                             ^~~~~~
                                             outbuff
Makefile:8167: recipe for target 'src/frontend/src_frontend_libmcxx_la-cxx-exprtype.lo' failed
make[2]: *** [src/frontend/src_frontend_libmcxx_la-cxx-exprtype.lo] Error 1

This is what I get whether I use --with-libiconv-prefix=<path> or --without-libiconv-prefix flag in the configuration.

Maybe it looks like a bug in the src?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.