CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

../externals/cgns/hdf5/H5public.h:63:10: fatal error: mpi.h: No such file or director

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 1 Post By bigfootedrockmidget
  • 1 Post By Murillo
  • 1 Post By bigfootedrockmidget
  • 1 Post By Murillo
  • 2 Post By bigfootedrockmidget
  • 2 Post By bigfootedrockmidget

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2023, 23:30
Exclamation ../externals/cgns/hdf5/H5public.h:63:10: fatal error: mpi.h: No such file or director
  #1
New Member
 
Mohsin
Join Date: Jul 2023
Posts: 21
Rep Power: 3
Mohsin1 is on a distinguished road
Hi i am trying to compile su2 for parallel support. but I am getting this error

Code:
[9/1078] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5A.c.o

FAILED: externals/cgns/hdf5/libsu2hdf5.a.p/H5A.c.o 

cc -Iexternals/cgns/hdf5/libsu2hdf5.a.p -Iexternals/cgns/hdf5 -I../externals/cgns/hdf5 -fdiagnostics-color=always -std=c99 -g -fPIC -Wno-unused-result -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-sign-compare -Wno-stringop-overflow -Wno-error=discarded-qualifiers -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-label -Wno-pedantic -Wno-error=stringop-truncation -Wno-error=cast-function-type -Wno-stringop-truncation -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE -MD -MQ externals/cgns/hdf5/libsu2hdf5.a.p/H5A.c.o -MF externals/cgns/hdf5/libsu2hdf5.a.p/H5A.c.o.d -o externals/cgns/hdf5/libsu2hdf5.a.p/H5A.c.o -c ../externals/cgns/hdf5/H5A.c

In file included from ../externals/cgns/hdf5/H5private.h:27,

                 from ../externals/cgns/hdf5/H5A.c:24:

../externals/cgns/hdf5/H5public.h:63:10: fatal error: mpi.h: No such file or directory

   63 | #include <mpi.h>

      |          ^~~~~~~

compilation terminated.

[10/1078] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5Abtree2.c.o

FAILED: externals/cgns/hdf5/libsu2hdf5.a.p/H5Abtree2.c.o 

cc -Iexternals/cgns/hdf5/libsu2hdf5.a.p -Iexternals/cgns/hdf5 -I../externals/cgns/hdf5 -fdiagnostics-color=always -std=c99 -g -fPIC -Wno-unused-result -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-sign-compare -Wno-stringop-overflow -Wno-error=discarded-qualifiers -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-label -Wno-pedantic -Wno-error=stringop-truncation -Wno-error=cast-function-type -Wno-stringop-truncation -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE -MD -MQ externals/cgns/hdf5/libsu2hdf5.a.p/H5Abtree2.c.o -MF externals/cgns/hdf5/libsu2hdf5.a.p/H5Abtree2.c.o.d -o externals/cgns/hdf5/libsu2hdf5.a.p/H5Abtree2.c.o -c ../externals/cgns/hdf5/H5Abtree2.c

In file included from ../externals/cgns/hdf5/H5private.h:27,

                 from ../externals/cgns/hdf5/H5Abtree2.c:34:

../externals/cgns/hdf5/H5public.h:63:10: fatal error: mpi.h: No such file or directory

   63 | #include <mpi.h>

      |          ^~~~~~~

compilation terminated.

[11/1078] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5trace.c.o

FAILED: externals/cgns/hdf5/libsu2hdf5.a.p/H5trace.c.o 

cc -Iexternals/cgns/hdf5/libsu2hdf5.a.p -Iexternals/cgns/hdf5 -I../externals/cgns/hdf5 -fdiagnostics-color=always -std=c99 -g -fPIC -Wno-unused-result -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-sign-compare -Wno-stringop-overflow -Wno-error=discarded-qualifiers -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-label -Wno-pedantic -Wno-error=stringop-truncation -Wno-error=cast-function-type -Wno-stringop-truncation -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE -MD -MQ externals/cgns/hdf5/libsu2hdf5.a.p/H5trace.c.o -MF externals/cgns/hdf5/libsu2hdf5.a.p/H5trace.c.o.d -o externals/cgns/hdf5/libsu2hdf5.a.p/H5trace.c.o -c ../externals/cgns/hdf5/H5trace.c

In file included from ../externals/cgns/hdf5/H5private.h:27,

                 from ../externals/cgns/hdf5/H5trace.c:34:

../externals/cgns/hdf5/H5public.h:63:10: fatal error: mpi.h: No such file or directory

   63 | #include <mpi.h>

      |          ^~~~~~~

compilation terminated.

ninja: build stopped: subcommand failed.

First of all I compiled it for serial support and i did not get any error, using the following commands:
Code:
./meson.py build
./ninja -C build install
Then i used this command:
Code:
./meson.py build --reconfigure -Dcustom-mpi=true -Dextra-deps=mpich -Denable-autodiff=true  --buildtype=debug
The output of this command was this:

Code:
git command not found. Using fall-back method to init submodules

The Meson build system

Version: 0.61.1

Source dir: /home/mohsin/Downloads/SU2-7.5.1

Build dir: /home/mohsin/Downloads/SU2-7.5.1/build

Build type: native build

Project name: SU2

Project version: 7.5.1 "Blackbird"

C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")

C linker for the host machine: cc ld.bfd 2.38

C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")

C++ linker for the host machine: c++ ld.bfd 2.38

Host machine cpu family: x86_64

Host machine cpu: x86_64

Program python3 found: YES (/home/mohsin/anaconda3/bin/python3)

WARNING: Python files installed by Meson might not be found by python interpreter.

 This warning can be avoided by setting "python.platlibdir" option.

WARNING: Python files installed by Meson might not be found by python interpreter.

 This warning can be avoided by setting "python.purelibdir" option.

Compiler for C++ supports arguments -Wno-ignored-qualifiers: YES (cached)

Compiler for C++ supports arguments -Wno-unused-parameter: YES (cached)

Compiler for C++ supports arguments -Wno-deprecated-declarations: YES (cached)

Compiler for C++ supports arguments -Wno-error=cast-function-type: YES (cached)

Compiler for C++ supports arguments -Wno-cast-function-type: YES (cached)

Compiler for C++ supports arguments -Wno-error=stringop-truncation: YES (cached)

Compiler for C++ supports arguments -Wno-stringop-truncation: YES (cached)

Compiler for C++ supports arguments -Wno-error=missing-field-initializers: YES (cached)

Compiler for C++ supports arguments -Wno-missing-field-initializers: YES (cached)

Compiler for C++ supports arguments -Wno-error=class-memaccess: YES (cached)

Compiler for C++ supports arguments -Wno-class-memaccess: YES (cached)

Compiler for C++ supports arguments -Wno-unused-result: YES (cached)

Compiler for C++ supports arguments -Wno-unused-parameter: YES (cached)

Compiler for C++ supports arguments -Wno-unused-variable: YES (cached)

Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES (cached)

Compiler for C++ supports arguments -Wno-sign-compare: YES (cached)

Compiler for C++ supports arguments -Wno-error=unused-function: YES (cached)

Compiler for C++ supports arguments -Wno-pedantic: YES (cached)

Compiler for C++ supports arguments -Wno-error=stringop-truncation: YES (cached)

Compiler for C++ supports arguments -Wno-stringop-truncation: YES (cached)

Compiler for C++ supports arguments -Wno-error=absolute-value: YES (cached)

Compiler for C++ supports arguments -Wno-error=class-memaccess: YES (cached)

Compiler for C++ supports arguments -Wno-unused-result: YES (cached)

Compiler for C++ supports arguments -Wno-unused-parameter: YES (cached)

Compiler for C++ supports arguments -Wno-unused-variable: YES (cached)

Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES (cached)

Compiler for C++ supports arguments -Wno-sign-compare: YES (cached)

Compiler for C++ supports arguments -Wno-stringop-overflow: YES (cached)

Compiler for C++ supports arguments -Wno-error=discarded-qualifiers: YES (cached)

Compiler for C++ supports arguments -Wno-error=maybe-uninitialized: YES (cached)

Compiler for C++ supports arguments -Wno-error=unused-function: YES (cached)

Compiler for C++ supports arguments -Wno-error=unused-label: YES (cached)

Compiler for C++ supports arguments -Wno-pedantic: YES (cached)

Compiler for C++ supports arguments -Wno-error=stringop-truncation: YES (cached)

Compiler for C++ supports arguments -Wno-error=cast-function-type: YES (cached)

Compiler for C++ supports arguments -Wno-stringop-truncation: YES (cached)

Dependency zlib found: YES 1.2.11 (cached)

Found pkg-config: /usr/bin/pkg-config (0.29.2)

Did not find CMake 'cmake'

Found CMake: NO

Run-time dependency szip found: NO (tried pkgconfig and cmake)

Has header "zlib.h" : YES (cached)

Checking for function "inflate" with dependency zlib: YES (cached)

Has header "sys/file.h" : YES (cached)

Has header "sys/ioctl.h" : YES (cached)

Has header "sys/resource.h" : YES (cached)

Has header "sys/socket.h" : YES (cached)

Has header "sys/stat.h" : YES (cached)

Has header "sys/time.h" : YES (cached)

Has header "sys/types.h" : YES (cached)

Has header "features.h" : YES (cached)

Has header "dirent.h" : YES (cached)

Has header "setjmp.h" : YES (cached)

Has header "stddef.h" : YES (cached)

Has header "stdint.h" : YES (cached)

Has header "unistd.h" : YES (cached)

Has header "io.h" : NO (cached)

Has header "winsock2.h" : NO (cached)

Has header "globus/common.h" : NO (cached)

Has header "pdb.h" : NO (cached)

Has header "pthread.h" : YES (cached)

Has header "srbclient.h" : NO (cached)

Has header "string.h" : YES (cached)

Has header "strings.h" : YES (cached)

Has header "stdlib.h" : YES (cached)

Has header "memory.h" : YES (cached)

Has header "dlfcn.h" : YES (cached)

Has header "inttypes.h" : YES (cached)

Has header "netinet/in.h" : YES (cached)

Has header "netdb.h" : YES (cached)

Has header "arpa/inet.h" : YES (cached)

Has header "stdbool.h" : YES (cached)

Has header "quadmath.h" : YES (cached)

Library m found: YES

Checking for function "ceil" with dependency -lm: YES (cached)

Library dl found: YES

Checking for function "dlopen" with dependency -ldl: YES (cached)

Library ucb found: NO

Checking for function "gethostbyname" with dependency -lucb: NO (cached)

Checking for function "lseek64" : NO (cached)

Checking for function "fseeko" : NO (cached)

Checking for function "stat64" : NO (cached)

Checking for size of "char" : 1

Checking for size of "short" : 2

Checking for size of "int" : 4

Checking for size of "unsigned" : 4

Checking for size of "long" : 8

Checking for size of "long long" : 8

Checking for size of "__int64" : -1

Checking for size of "float" : 4

Checking for size of "double" : 8

Checking for size of "long double" : 16

Checking for size of "int8_t" : 1

Checking for size of "uint8_t" : 1

Checking for size of "int_least8_t" : 1

Checking for size of "uint_least8_t" : 1

Checking for size of "int_fast8_t" : 1

Checking for size of "uint_fast8_t" : 1

Checking for size of "int16_t" : 2

Checking for size of "uint16_t" : 2

Checking for size of "int_least16_t" : 2

Checking for size of "uint_least16_t" : 2

Checking for size of "int_fast16_t" : 8

Checking for size of "uint_fast16_t" : 8

Checking for size of "int32_t" : 4

Checking for size of "uint32_t" : 4

Checking for size of "int_least32_t" : 4

Checking for size of "uint_least32_t" : 4

Checking for size of "int_fast32_t" : 8

Checking for size of "uint_fast32_t" : 8

Checking for size of "int64_t" : 8

Checking for size of "uint64_t" : 8

Checking for size of "int_least64_t" : 8

Checking for size of "uint_least64_t" : 8

Checking for size of "int_fast64_t" : 8

Checking for size of "uint_fast64_t" : 8

Checking for size of "size_t" : 8

Checking for size of "ssize_t" : -1

Checking for size of "ptrdiff_t" : -1

Checking for size of "off_t" : 8

Checking for size of "off64_t" : -1

Checking for size of "time_t" : 8

Checking for size of "bool" : 1

Checking for size of "_Quad" : -1

Checking for size of "__float128" : 16

Checking if "check dev_t" : compiles: YES (cached)

Checking if "check dev_t scalar" runs: YES

Checking if "CLOCK_MONOTONIC" : compiles: YES (cached)

Checking whether type "struct tm" has member "tm_gmtoff" : NO (cached)

Checking whether type "struct tm" has member "__tm_gmtoff" : YES (cached)

Checking whether type "struct tm" has member "tm_sec" : YES (cached)

Checking whether type "struct tm" has member "tz_minuteswest" : NO (cached)

Checking for function "gettimeofday" : YES (cached)

Checking whether type "struct stat" has member "st_blocks" : YES (cached)

Checking for function "ioctl" : YES (cached)

Header <sys/ioctl.h> has symbol "TIOCGWINSZ" : YES (cached)

Header <sys/ioctl.h> has symbol "TIOCGETD" : YES (cached)

Checking for function "getpwuid" : YES (cached)

Checking for function "alarm" : YES (cached)

Checking for function "fcntl" : YES (cached)

Checking for function "flock" : YES (cached)

Checking for function "fork" : YES (cached)

Checking for function "frexpf" : YES (cached)

Checking for function "frexpl" : YES (cached)

Checking for function "gethostname" : YES (cached)

Checking for function "getrusage" : YES (cached)

Checking for function "llround" : YES (cached)

Checking for function "llroundf" : YES (cached)

Checking for function "lround" : YES (cached)

Checking for function "lroundf" : YES (cached)

Checking for function "lstat" : YES (cached)

Checking for function "pread" : YES (cached)

Checking for function "pwrite" : YES (cached)

Checking for function "rand_r" : YES (cached)

Checking for function "random" : YES (cached)

Checking for function "round" : YES (cached)

Checking for function "roundf" : YES (cached)

Checking for function "setsysinfo" : NO (cached)

Checking for function "signal" : YES (cached)

Checking for function "longjmp" : YES (cached)

Checking for function "setjmp" : YES (cached)

Checking for function "siglongjmp" : YES (cached)

Checking for function "sigsetjmp" : NO (cached)

Checking for function "sigprocmask" : YES (cached)

Checking for function "snprintf" : YES (cached)

Checking for function "srandom" : YES (cached)

Checking for function "strdup" : YES (cached)

Checking for function "strtoll" : YES (cached)

Checking for function "strtoull" : YES (cached)

Checking for function "symlink" : YES (cached)

Checking for function "system" : YES (cached)

Checking for function "tmpfile" : YES (cached)

Checking for function "asprintf" : YES (cached)

Checking for function "vasprintf" : YES (cached)

Checking for function "waitpid" : YES (cached)

Checking for function "vsnprintf" : YES (cached)

Header <setjmp.h> has symbol "sigsetjmp" : NO (cached)

Checking if "inline keyword check" : compiles: YES (cached)

Configuring H5pubconf.h using configuration

Checking for size of "long" : 8

Checking for size of "void *" : 8

Configuring cgnstypes.h using configuration

Configuring cg_hash_types.h using configuration

Configuring cgnsconfig.h using configuration

Compiler for C++ supports arguments -Wno-unused-result: YES (cached)

Compiler for C++ supports arguments -Wno-unused-parameter: YES (cached)

Compiler for C++ supports arguments -Wno-unused-variable: YES (cached)

Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES (cached)

Compiler for C++ supports arguments -Wno-unknown-pragmas: YES (cached)

Compiler for C++ supports arguments -Wno-sign-compare: YES (cached)

Compiler for C++ supports arguments -Wno-clobbered: YES (cached)

Compiler for C++ supports arguments -Wno-empty-body: YES (cached)

Compiler for C++ supports arguments -Wno-unused-label: YES (cached)

Compiler for C++ supports arguments -Wno-misleading-indentation: YES (cached)

Compiler for C++ supports arguments -Wno-maybe-uninitialized: YES (cached)

Compiler for C++ supports arguments -Wno-pedantic: YES (cached)

Compiler for C++ supports arguments -Wno-error=absolute-value: YES (cached)

Compiler for C++ supports arguments -Wno-absolute-value: NO (cached)

WARNING: You should add the boolean check kwarg to the run_command call.

         It currently defaults to false,

         but it will default to true in future releases of meson.

         See also: https://github.com/mesonbuild/meson/issues/9300

Message: Boost sources found.

Compiler for C++ supports arguments -Wno-misleading-indentation: YES (cached)

Compiler for C++ supports arguments -Wno-uninitialized: YES (cached)

Compiler for C++ supports arguments -Wno-placement-new: YES (cached)

Compiler for C++ supports arguments -Wno-pedantic: YES (cached)

Compiler for C++ supports arguments -Wno-error=class-memaccess: YES (cached)

Compiler for C++ supports arguments -Wno-class-memaccess: YES (cached)

Compiler for C++ supports arguments -Wno-error=deprecated-copy: YES (cached)

Compiler for C++ supports arguments -Wno-deprecated-copy: YES (cached)

Compiler for C++ supports arguments -Wno-error=cast-function-type: YES (cached)

Compiler for C++ supports arguments -Wno-cast-function-type: YES (cached)

Run-time dependency mpich found: YES 4.0

Message: -------------------------------------------------------------------------

         |    ___ _   _ ___                                                      |

         |   / __| | | |_  )   Release 7.5.1 "Blackbird"                         |

         |   \__ \ |_| |/ /                                                      |

         |   |___/\___//___|   Meson Configuration Summary                       |

         |                                                                       |

         -------------------------------------------------------------------------

         

         Option          Value

         ---------------------

         TecIO:          true

         CGNS:           true

         AD (reverse):   true

         AD (forward):   false

         Python Wrapper: false

         Intel-MKL:      false

         OpenBlas:       false

         PaStiX:         false

         Mixed Float:    false

         libROM:         false

         CoolProp:       false



         Please be sure to add the $SU2_HOME and $SU2_RUN environment variables,

         and update your $PATH (and $PYTHONPATH if applicable) with $SU2_RUN



         Based on the input to this configuration, add these lines to your .bashrc file:



         export SU2_RUN=/usr/local/bin

         export SU2_HOME=/home/mohsin/Downloads/SU2-7.5.1

         export PATH=$PATH:$SU2_RUN

         export PYTHONPATH=$PYTHONPATH:$SU2_RUN



         Use './ninja -C build install' to compile and install SU2



Build targets in project: 20



SU2 7.5.1 "Blackbird"



  User defined options

    buildtype      : debug

    custom-mpi     : true

    enable-autodiff: true

    extra-deps     : mpich



Found ninja-1.10.0.git at /home/mohsin/Downloads/SU2-7.5.1/ninja
I am using:
ubuntu 22.04
anaconda3
python 3.11.4
SU2-7.5.1
Can somebody help me to solve this issue please.
Mohsin1 is offline   Reply With Quote

Old   November 23, 2023, 02:54
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 679
Rep Power: 21
bigfootedrockmidget is on a distinguished road
It's complaining about mpi, so you probably do not have it installed. Was compilation without mpi successful?
If that is the problem, install either mpich or openmpi, and install the develop package, which contains the header files.
Mohsin1 likes this.
bigfootedrockmidget is offline   Reply With Quote

Old   November 23, 2023, 16:40
Thumbs up
  #3
New Member
 
Join Date: Mar 2022
Posts: 5
Rep Power: 4
Murillo is on a distinguished road
Hello, I am having the same issues with SU2 v8.0.0 (branch new_turbo_outputs). I could compile for single core simulations, but could not compile for parallel process. Although I have installed mpich and openmpi, I'm still not being able to compile it for mpi.

murillo@DELL_XPS:/mnt/c/Users/muril/Documents/CFD/2023_11_SU2/new_turbo_outputs/su2$ whereis mpich
mpich: /usr/lib/x86_64-linux-gnu/mpich

murillo@DELL_XPS:/mnt/c/Users/muril/Documents/CFD/2023_11_SU2/new_turbo_outputs/su2$ whereis openmpi
openmpi: /usr/lib/x86_64-linux-gnu/openmpi /etc/openmpi /usr/share/openmpi


My computer is running with Windows 11, but I'm doing all configuration using Windows Subsystem for Linux (WSL) and using Ubuntu as operational system. Previously this computed had ANSYS CFX with MPI installed, but I have uninstalled it.

Please let me know if you have any additional tips or suggestions that might help.
Mohsin1 likes this.
Murillo is offline   Reply With Quote

Old   November 23, 2023, 18:41
Default
  #4
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 679
Rep Power: 21
bigfootedrockmidget is on a distinguished road
During the meson run you can check if the compiler uses mpi. It should look something like below, if it is just saying it uses mpicc then it did not detect the mpi installation.



Code:
C compiler for the host machine: /usr/bin/mpicc.mpich (gcc 11.4.0 "gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0") 
C linker for the host machine: /usr/bin/mpicc.mpich ld.bfd 2.38
in ubuntu I installed mpich, libmpich and libmpich-dev.
If you have multiple mpi versions, you can make sure that the correct one is linked using:
Code:
$ update-alternatives --config mpirun
There are 3 choices for the alternative mpirun (providing /usr/bin/mpirun). 

  Selection    Path                     Priority   Status 
------------------------------------------------------------ 
  0            /usr/bin/mpirun.openmpi   50        auto mode 
  1            /usr/bin/mpirun.lam       30        manual mode 
* 2            /usr/bin/mpirun.mpich     40        manual mode 
  3            /usr/bin/mpirun.openmpi   50        manual mode 

Press <enter> to keep the current choice[*], or type selection number: 
Murillo likes this.
bigfootedrockmidget is offline   Reply With Quote

Old   November 24, 2023, 12:01
Default
  #5
New Member
 
Join Date: Mar 2022
Posts: 5
Rep Power: 4
Murillo is on a distinguished road
I updated the mpirun configurations as suggested:

Code:
murillo@DELL_XPS:/usr/bin$ sudo update-alternatives --config mpirun
[sudo] password for murillo:
There are 2 choices for the alternative mpirun (providing /usr/bin/mpirun).

  Selection    Path                     Priority   Status
------------------------------------------------------------
* 0            /usr/bin/mpirun.openmpi   50        auto mode
  1            /usr/bin/mpirun.mpich     40        manual mode
  2            /usr/bin/mpirun.openmpi   50        manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/mpirun.mpich to provide /usr/bin/mpirun (mpirun) in manual mode
murillo@DELL_XPS:/usr/bin$ sudo update-alternatives --config mpirun
There are 2 choices for the alternative mpirun (providing /usr/bin/mpirun).

  Selection    Path                     Priority   Status
------------------------------------------------------------
  0            /usr/bin/mpirun.openmpi   50        auto mode
* 1            /usr/bin/mpirun.mpich     40        manual mode
  2            /usr/bin/mpirun.openmpi   50        manual mode

Press <enter> to keep the current choice[*], or type selection number:
I ran the following command:

Code:
python3 meson.py build --reconfigure -Dcustom-mpi=true -Dwith-mpi=enabled -Denable-autodiff=true
But meson still is not able to get the right C compiler.

Code:
Project version: 8.0.0 "Harrier"
C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the host machine: cc ld.bfd 2.38
C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C++ linker for the host machine: c++ ld.bfd 2.38
I also tried running other meson commands, without success.

Code:
python3 meson.py build --reconfigure -Dcustom-mpi=true -Dextra-deps=mpich -Dwith-mpi=enabled -Denable-autodiff=true
Please let me know if you have any additional ideas on how to solve this.

This is the complete meson output:

Code:
murillo@DELL_XPS:/mnt/c/Users/muril/Documents/CFD/2023_11_SU2/new_turbo_outputs/su2$ python3 meson.py build --reconfigure -Dcustom-mpi=true -Dwith-mpi=enabled -Denable-autodiff=true
update CoolProp
/mnt/c/Users/muril/Documents/CFD/2023_11_SU2/new_turbo_outputs/su2/subprojects/CoolProp
/mnt/c/Users/muril/Documents/CFD/2023_11_SU2/new_turbo_outputs/su2
CoolProp updated
The Meson build system
Version: 0.61.1
Source dir: /mnt/c/Users/muril/Documents/CFD/2023_11_SU2/new_turbo_outputs/su2
Build dir: /mnt/c/Users/muril/Documents/CFD/2023_11_SU2/new_turbo_outputs/su2/build
Build type: native build
Project name: SU2
Project version: 8.0.0 "Harrier"
C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the host machine: cc ld.bfd 2.38
C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C++ linker for the host machine: c++ ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 found: YES (/usr/bin/python3)
WARNING: Python files installed by Meson might not be found by python interpreter.
 This warning can be avoided by setting "python.platlibdir" option.
WARNING: Python files installed by Meson might not be found by python interpreter.
 This warning can be avoided by setting "python.purelibdir" option.
Compiler for C++ supports arguments -Wno-ignored-qualifiers: YES (cached)
Compiler for C++ supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C++ supports arguments -Wno-deprecated-declarations: YES (cached)
Compiler for C++ supports arguments -Wno-error=cast-function-type: YES (cached)
Compiler for C++ supports arguments -Wno-cast-function-type: YES (cached)
Compiler for C++ supports arguments -Wno-error=stringop-truncation: YES (cached)
Compiler for C++ supports arguments -Wno-stringop-truncation: YES (cached)
Compiler for C++ supports arguments -Wno-error=missing-field-initializers: YES (cached)
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES (cached)
Compiler for C++ supports arguments -Wno-error=class-memaccess: YES (cached)
Compiler for C++ supports arguments -Wno-class-memaccess: YES (cached)
Compiler for C supports arguments -Wno-unused-result: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wno-unused-variable: YES (cached)
Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C supports arguments -Wno-sign-compare: YES (cached)
Compiler for C supports arguments -Wno-error=unused-function: YES (cached)
Compiler for C supports arguments -Wno-pedantic: YES (cached)
Compiler for C supports arguments -Wno-error=stringop-truncation: YES (cached)
Compiler for C supports arguments -Wno-stringop-truncation: YES (cached)
Compiler for C supports arguments -Wno-error=absolute-value: YES (cached)
Compiler for C supports arguments -Wno-error=class-memaccess: YES (cached)
Compiler for C supports arguments -Wno-unused-result: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wno-unused-variable: YES (cached)
Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C supports arguments -Wno-sign-compare: YES (cached)
Compiler for C supports arguments -Wno-stringop-overflow: YES (cached)
Compiler for C supports arguments -Wno-error=discarded-qualifiers: YES (cached)
Compiler for C supports arguments -Wno-error=maybe-uninitialized: YES (cached)
Compiler for C supports arguments -Wno-error=unused-function: YES (cached)
Compiler for C supports arguments -Wno-error=unused-label: YES (cached)
Compiler for C supports arguments -Wno-pedantic: YES (cached)
Compiler for C supports arguments -Wno-error=stringop-truncation: YES (cached)
Compiler for C supports arguments -Wno-error=cast-function-type: YES (cached)
Compiler for C supports arguments -Wno-stringop-truncation: YES (cached)
Dependency zlib found: YES 1.2.11 (cached)
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Found CMake: /home/murillo/.local/bin/cmake (3.27.7)
Run-time dependency szip found: NO (tried pkgconfig and cmake)
Has header "zlib.h" : YES (cached)
Checking for function "inflate" with dependency zlib: YES (cached)
Has header "sys/file.h" : YES (cached)
Has header "sys/ioctl.h" : YES (cached)
Has header "sys/resource.h" : YES (cached)
Has header "sys/socket.h" : YES (cached)
Has header "sys/stat.h" : YES (cached)
Has header "sys/time.h" : YES (cached)
Has header "sys/types.h" : YES (cached)
Has header "features.h" : YES (cached)
Has header "dirent.h" : YES (cached)
Has header "setjmp.h" : YES (cached)
Has header "stddef.h" : YES (cached)
Has header "stdint.h" : YES (cached)
Has header "unistd.h" : YES (cached)
Has header "io.h" : NO (cached)
Has header "winsock2.h" : NO (cached)
Has header "globus/common.h" : NO (cached)
Has header "pdb.h" : NO (cached)
Has header "pthread.h" : YES (cached)
Has header "srbclient.h" : NO (cached)
Has header "string.h" : YES (cached)
Has header "strings.h" : YES (cached)
Has header "stdlib.h" : YES (cached)
Has header "memory.h" : YES (cached)
Has header "dlfcn.h" : YES (cached)
Has header "inttypes.h" : YES (cached)
Has header "netinet/in.h" : YES (cached)
Has header "netdb.h" : YES (cached)
Has header "arpa/inet.h" : YES (cached)
Has header "stdbool.h" : YES (cached)
Has header "quadmath.h" : YES (cached)
Library m found: YES
Checking for function "ceil" with dependency -lm: YES (cached)
Library dl found: YES
Checking for function "dlopen" with dependency -ldl: YES (cached)
Library ucb found: NO
Checking for function "gethostbyname" with dependency -lucb: NO (cached)
Checking for function "lseek64" : NO (cached)
Checking for function "fseeko" : NO (cached)
Checking for function "stat64" : NO (cached)
Checking for size of "char" : 1
Checking for size of "short" : 2
Checking for size of "int" : 4
Checking for size of "unsigned" : 4
Checking for size of "long" : 8
Checking for size of "long long" : 8
Checking for size of "__int64" : -1
Checking for size of "float" : 4
Checking for size of "double" : 8
Checking for size of "long double" : 16
Checking for size of "int8_t" : 1
Checking for size of "uint8_t" : 1
Checking for size of "int_least8_t" : 1
Checking for size of "uint_least8_t" : 1
Checking for size of "int_fast8_t" : 1
Checking for size of "uint_fast8_t" : 1
Checking for size of "int16_t" : 2
Checking for size of "uint16_t" : 2
Checking for size of "int_least16_t" : 2
Checking for size of "uint_least16_t" : 2
Checking for size of "int_fast16_t" : 8
Checking for size of "uint_fast16_t" : 8
Checking for size of "int32_t" : 4
Checking for size of "uint32_t" : 4
Checking for size of "int_least32_t" : 4
Checking for size of "uint_least32_t" : 4
Checking for size of "int_fast32_t" : 8
Checking for size of "uint_fast32_t" : 8
Checking for size of "int64_t" : 8
Checking for size of "uint64_t" : 8
Checking for size of "int_least64_t" : 8
Checking for size of "uint_least64_t" : 8
Checking for size of "int_fast64_t" : 8
Checking for size of "uint_fast64_t" : 8
Checking for size of "size_t" : 8
Checking for size of "ssize_t" : -1
Checking for size of "ptrdiff_t" : -1
Checking for size of "off_t" : 8
Checking for size of "off64_t" : -1
Checking for size of "time_t" : 8
Checking for size of "bool" : 1
Checking for size of "_Quad" : -1
Checking for size of "__float128" : 16
Checking if "check dev_t" : compiles: YES (cached)
Checking if "check dev_t scalar" runs: NO (1)
Checking if "CLOCK_MONOTONIC" : compiles: YES (cached)
Checking whether type "struct tm" has member "tm_gmtoff" : NO (cached)
Checking whether type "struct tm" has member "__tm_gmtoff" : YES (cached)
Checking whether type "struct tm" has member "tm_sec" : YES (cached)
Checking whether type "struct tm" has member "tz_minuteswest" : NO (cached)
Checking for function "gettimeofday" : YES (cached)
Checking whether type "struct stat" has member "st_blocks" : YES (cached)
Checking for function "ioctl" : YES (cached)
Header <sys/ioctl.h> has symbol "TIOCGWINSZ" : YES (cached)
Header <sys/ioctl.h> has symbol "TIOCGETD" : YES (cached)
Checking for function "getpwuid" : YES (cached)
Checking for function "alarm" : YES (cached)
Checking for function "fcntl" : YES (cached)
Checking for function "flock" : YES (cached)
Checking for function "fork" : YES (cached)
Checking for function "frexpf" : YES (cached)
Checking for function "frexpl" : YES (cached)
Checking for function "gethostname" : YES (cached)
Checking for function "getrusage" : YES (cached)
Checking for function "llround" : YES (cached)
Checking for function "llroundf" : YES (cached)
Checking for function "lround" : YES (cached)
Checking for function "lroundf" : YES (cached)
Checking for function "lstat" : YES (cached)
Checking for function "pread" : YES (cached)
Checking for function "pwrite" : YES (cached)
Checking for function "rand_r" : YES (cached)
Checking for function "random" : YES (cached)
Checking for function "round" : YES (cached)
Checking for function "roundf" : YES (cached)
Checking for function "setsysinfo" : NO (cached)
Checking for function "signal" : YES (cached)
Checking for function "longjmp" : YES (cached)
Checking for function "setjmp" : YES (cached)
Checking for function "siglongjmp" : YES (cached)
Checking for function "sigsetjmp" : NO (cached)
Checking for function "sigprocmask" : YES (cached)
Checking for function "snprintf" : YES (cached)
Checking for function "srandom" : YES (cached)
Checking for function "strdup" : YES (cached)
Checking for function "strtoll" : YES (cached)
Checking for function "strtoull" : YES (cached)
Checking for function "symlink" : YES (cached)
Checking for function "system" : YES (cached)
Checking for function "tmpfile" : YES (cached)
Checking for function "asprintf" : YES (cached)
Checking for function "vasprintf" : YES (cached)
Checking for function "waitpid" : YES (cached)
Checking for function "vsnprintf" : YES (cached)
Header <setjmp.h> has symbol "sigsetjmp" : NO (cached)
Checking if "inline keyword check" : compiles: YES (cached)
Configuring H5pubconf.h using configuration
Checking for size of "long" : 8
Checking for size of "void *" : 8
Configuring cgnstypes.h using configuration
Configuring cg_hash_types.h using configuration
Configuring cgnsconfig.h using configuration
Compiler for C++ supports arguments -Wno-unused-result: YES (cached)
Compiler for C++ supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C++ supports arguments -Wno-unused-variable: YES (cached)
Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C++ supports arguments -Wno-unknown-pragmas: YES (cached)
Compiler for C++ supports arguments -Wno-sign-compare: YES (cached)
Compiler for C++ supports arguments -Wno-clobbered: YES (cached)
Compiler for C++ supports arguments -Wno-empty-body: YES (cached)
Compiler for C++ supports arguments -Wno-unused-label: YES (cached)
Compiler for C++ supports arguments -Wno-misleading-indentation: YES (cached)
Compiler for C++ supports arguments -Wno-maybe-uninitialized: YES (cached)
Compiler for C++ supports arguments -Wno-pedantic: YES (cached)
Compiler for C++ supports arguments -Wno-error=absolute-value: YES (cached)
Compiler for C++ supports arguments -Wno-absolute-value: NO (cached)
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
Message: Boost sources found.
Compiler for C++ supports arguments -Wno-misleading-indentation: YES (cached)
Compiler for C++ supports arguments -Wno-uninitialized: YES (cached)
Compiler for C++ supports arguments -Wno-placement-new: YES (cached)
Compiler for C++ supports arguments -Wno-pedantic: YES (cached)
Compiler for C++ supports arguments -Wno-error=class-memaccess: YES (cached)
Compiler for C++ supports arguments -Wno-class-memaccess: YES (cached)
Compiler for C++ supports arguments -Wno-error=deprecated-copy: YES (cached)
Compiler for C++ supports arguments -Wno-deprecated-copy: YES (cached)
Compiler for C++ supports arguments -Wno-error=cast-function-type: YES (cached)
Compiler for C++ supports arguments -Wno-cast-function-type: YES (cached)
Dependency mpich found: YES 4.0 (cached)
Message: -------------------------------------------------------------------------
         |    ___ _   _ ___                                                      |
         |   / __| | | |_  )   Release 8.0.0 "Harrier"                           |
         |   \__ \ |_| |/ /                                                      |
         |   |___/\___//___|   Meson Configuration Summary                       |
         |                                                                       |
         -------------------------------------------------------------------------

         Option          Value
         ---------------------
         TecIO:          true
         CGNS:           true
         AD (reverse):   true
         AD (forward):   false
         Python Wrapper: false
         Intel-MKL:      false
         OpenBlas:       false
         PaStiX:         false
         Mixed Float:    false
         libROM:         false
         CoolProp:       false
         MLPCpp:         false

         Please be sure to add the $SU2_HOME and $SU2_RUN environment variables,
         and update your $PATH (and $PYTHONPATH if applicable) with $SU2_RUN

         Based on the input to this configuration, add these lines to your .bashrc file:

         export SU2_RUN=/usr/local/bin
         export SU2_HOME=/mnt/c/Users/muril/Documents/CFD/2023_11_SU2/new_turbo_outputs/su2
         export PATH=$PATH:$SU2_RUN
         export PYTHONPATH=$PYTHONPATH:$SU2_RUN

         Use './ninja -C build install' to compile and install SU2

Build targets in project: 22

SU2 8.0.0 "Harrier"

  User defined options
    custom-mpi     : true
    enable-autodiff: true
    extra-deps     : mpich
    with-mpi       : enabled

Found ninja-1.10.0.git at /mnt/c/Users/muril/Documents/CFD/2023_11_SU2/new_turbo_outputs/su2/ninja
Mohsin1 likes this.
Murillo is offline   Reply With Quote

Old   November 25, 2023, 03:54
Default I tried this but this gave me an error
  #6
New Member
 
Mohsin
Join Date: Jul 2023
Posts: 21
Rep Power: 3
Mohsin1 is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
During the meson run you can check if the compiler uses mpi. It should look something like below, if it is just saying it uses mpicc then it did not detect the mpi installation.



Code:
C compiler for the host machine: /usr/bin/mpicc.mpich (gcc 11.4.0 "gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0") 
C linker for the host machine: /usr/bin/mpicc.mpich ld.bfd 2.38
in ubuntu I installed mpich, libmpich and libmpich-dev.
If you have multiple mpi versions, you can make sure that the correct one is linked using:
Code:
$ update-alternatives --config mpirun
There are 3 choices for the alternative mpirun (providing /usr/bin/mpirun). 

  Selection    Path                     Priority   Status 
------------------------------------------------------------ 
  0            /usr/bin/mpirun.openmpi   50        auto mode 
  1            /usr/bin/mpirun.lam       30        manual mode 
* 2            /usr/bin/mpirun.mpich     40        manual mode 
  3            /usr/bin/mpirun.openmpi   50        manual mode 

Press <enter> to keep the current choice[*], or type selection number: 
I pressed 1 and then enter, and this was my output
Code:
(base) mohsin@mohsin:~/Desktop/Constrained shape design of a transonic turbulent airfoil$ update-alternatives --config mpirun

There are 2 choices for the alternative mpirun (providing /usr/bin/mpirun).



  Selection    Path                     Priority   Status

------------------------------------------------------------

* 0            /usr/bin/mpirun.openmpi   50        auto mode

  1            /usr/bin/mpirun.mpich     40        manual mode

  2            /usr/bin/mpirun.openmpi   50        manual mode



Press <enter> to keep the current choice[*], or type selection number: 1

update-alternatives: using /usr/bin/mpirun.mpich to provide /usr/bin/mpirun (mpirun) in manual mode

update-alternatives: error: error creating symbolic link '/etc/alternatives/mpirun.dpkg-tmp': Permission denied
Mohsin1 is offline   Reply With Quote

Old   November 25, 2023, 04:05
Default
  #7
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 679
Rep Power: 21
bigfootedrockmidget is on a distinguished road
update-alternatives should create symbolic links to cc with the right link to mpi. You can check with

Code:
which cc
and for example

Code:
ls -lrt /usr/bin/cc
where the link takes you, it should end up in an mpi version of the compiler.
You could force another default compiler by setting


Code:
export MPICXX='/usr/bin/mpicxx.mpich' 
export MPICC='/usr/bin/mpicc.mpich'
export CXX=$MPICXX 
 export CC=$MPICC
Meson should then report mpicxx.mpich as compiler. Just make sure that you actually have the mpicxx.mpich and mpicc.mpich commands
CleverBoy and Mohsin1 like this.
bigfootedrockmidget is offline   Reply With Quote

Old   November 25, 2023, 04:19
Default
  #8
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 679
Rep Power: 21
bigfootedrockmidget is on a distinguished road
You can also test if mpi is correctly installed with a simple helloworld example, e.g.

Code:
#include <mpi.h> 
#include <stdio.h> 

int main(int argc, char** argv) { 
    // Initialize the MPI environment 
    MPI_Init(NULL, NULL); 

    // Get the number of processes 
    int world_size; 
    MPI_Comm_size(MPI_COMM_WORLD, &world_size); 

    // Get the rank of the process 
    int world_rank; 
    MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); 

    // Get the name of the processor 
    char processor_name[MPI_MAX_PROCESSOR_NAME]; 
    int name_len; 
    MPI_Get_processor_name(processor_name, &name_len); 

    // Print off a hello world message 
    printf("Hello world from processor %s, rank %d out of %d processors\n", 
           processor_name, world_rank, world_size); 

    // Finalize the MPI environment. 
    MPI_Finalize(); 
} 
~

Code:
mpicc.mpich -o helloworld helloworld.c
mpirun.mpich -n 4 ./helloworld
Murillo and Mohsin1 like this.
bigfootedrockmidget is offline   Reply With Quote

Old   November 25, 2023, 04:46
Default Thank you everyone for helping. I have solved the problem
  #9
New Member
 
Mohsin
Join Date: Jul 2023
Posts: 21
Rep Power: 3
Mohsin1 is on a distinguished road
So, before I start explaining how i solved my problem, i would like to let you know that i am using following things:

ubuntu 22.04 (on virtual box version 7.0.10)
anaconda3
python 3.11.4
SU2-7.5.1

1. I installed anaconda by using this command
Code:
wget https://repo.anaconda.com/archive/Anaconda3-2023.07-2-Linux-x86_64.sh
2. Then i downloaded SU2-7.5.1.
3. Then i ran following commands one by one:

Code:
conda install cmake
conda install pkg-config
conda install gxx_linux-64
pip install mpi4py 
pip install swig
./meson.py build -Dcustom-mpi=true -Dextra-deps=mpich -Denable-autodiff=true
./ninja -C build install
Then i entered following in a new terminal
Code:
nano .bashrc
Then i pasted following lines to the end
Code:
export SU2_RUN=/usr/local/bin

export SU2_HOME=/home/mohsin/Downloads/SU2-7.5.1

export PATH=$PATH:$SU2_RUN

export PYTHONPATH=$PYTHONPATH:$SU2_RUN

Thats it.

I am a newbie so i don't know why this worked but it worked lol
Mohsin1 is offline   Reply With Quote

Reply

Tags
cgns, mpi.h, mpich, parallel compilation, su2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 62 October 2, 2022 04:50
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24


All times are GMT -4. The time now is 16:05.