You are here

Error compiling mpi under Big Sur

3 posts / 0 new
Last post
Error compiling mpi under Big Sur
#1

Using updated Xcode and a fresh install of macos Big Sur, I get the following error (below) when compiling using: "./scons.py -j 12 mode=release bin extras=mpi"

 Open-mpi is installed (via homebrew) and if I run "ompi_info" all the info seems correct (see atached .txt). Any suggestions would be appreacited. Thanks!

-Andrew

 

mpicc -o build/external/release/macos/10.16/64/x86/clang/12.0/mpi/cifparse/DICParser.os -c -std=c99 -isystem external/boost_1_55_0/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -march=core2 -mtune=generic -pipe -Qunused-arguments -DUNUSUAL_ALLOCATOR_DECLARATION -ftemplate-depth-256 -stdlib=libstdc++ -Wno-long-long -Wno-strict-aliasing -march=native -mtune=native -stdlib=libc++ -Wno-unused-variable -O3 -Wno-unused-variable -Wno-unused-parameter -DPOSIX_MISTAKE -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DPTR_STD -DNDEBUG -DUSEMPI -Iexternal/include external/cifparse/DICParser.c

<stdout>:1960:3: note: did you mean 'fread'?

<stdout>:1470:20: note: expanded from macro 'YY_INPUT'

        while ( (result = read( fileno(cifparser_in), (char *) buf, max_size )) < 0 ) \

                          ^

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:158:9: note: 'fread' declared here

size_t   fread(void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream);

         ^

1 error generated.

scons: *** [build/external/release/macos/10.16/64/x86/clang/12.0/mpi/cifparse/CifScanner.os] Error 1

external/cifparse/TableFile.C:489:11: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]

    if (&(_tables[tableIndex]) != nullptr)

         ~^~~~~~~~~~~~~~~~~~~~    ~~~~~~~

external/cifparse/mapped_ptr_vector.h:205:8: note: 'operator[]' returns a reference

    T& operator[](unsigned int index);

       ^

external/cifparse/TableFile.C:552:19: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]

            if (&(_blocks[blockI]._tables[tableI]) != nullptr)

                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~

external/cifparse/mapped_ptr_vector.h:205:8: note: 'operator[]' returns a reference

    T& operator[](unsigned int index);

       ^

external/cifparse/TableFile.C:694:19: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]

            if (&(_blocks[blockI]._tables[tableI]) == nullptr)

                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~

external/cifparse/mapped_ptr_vector.h:205:8: note: 'operator[]' returns a reference

    T& operator[](unsigned int index);

       ^

external/cifparse/TableFile.C:759:19: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]

            if (&(_blocks[blockI]._tables[tableI]) == nullptr)

                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~

external/cifparse/mapped_ptr_vector.h:205:8: note: 'operator[]' returns a reference

    T& operator[](unsigned int index);

       ^

external/cifparse/TableFile.C:916:11: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]

    if (&(_blocks[blockIndex]._tables[tableIndex]) != nullptr)

         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~

external/cifparse/mapped_ptr_vector.h:205:8: note: 'operator[]' returns a reference

    T& operator[](unsigned int index);

       ^

5 warnings generated.

1 warning generated.

scons: building terminated because of errors.

 

AttachmentSize
ompi_info.txt12.43 KB
Category: 
Post Situation: 
Tue, 2020-12-29 11:06
amorin

I don't think this has anything to do with the MPI being used. From what I can tell, it's likely due to the MacOS 10.16/Clang 12.0 compiler not liking a particular construct in Rosetta.

Which version of Rosetta are you compiling? If it's a somewhat older version (which for this purpose would include Rosetta 3.12), it may not have been updated for the Big Sur compiler. I might recommend trying the most recent weekly release. That (hopefully) should have the relevant fixes for Big Sur in it by now.

Tue, 2021-02-09 08:27
rmoretti

Hi Rocco,

Thanks a bunch for the response! You were absolutely right, a newer version of rosetta solved the problem. 

For the record, the problem occcured using "rosetta_bin_mac_2020.08.61146_bundle" - which is not that old, but moving to "rosetta_bin_mac_2020.50.61505_bundle" solved the issue. 

Thanks again!

 

-Andrew

Tue, 2021-02-09 22:35
amorin