Error: Can't open included file 'mpif.h'

2,897 views
Skip to first unread message

Justin Li

unread,
Dec 8, 2016, 4:28:03 AM12/8/16
to pencil-code-discuss
Hi, 

I've just got the latest code from the website http://pencil-code.nordita.org/. The code is quite versatile and I am truly grateful for you guys' work. However, I encountered an error when I ran the samples with parallel computing, e.g. conv-slab, interstellar etc. The error is :

mpicomm.f90:55: Error: Can't open included file 'mpif.h'

But I do have openmpi installed on my system. When I run "mpif90 --show", the result is:

mpif90 --show

gfortran -I/usr/lib/openmpi/include -pthread -I/usr/lib/openmpi/lib -L/usr//lib -L/usr/lib/openmpi/lib -lmpi_f90 -lmpi_f
77 -lmpi -ldl -lhwloc

I've tried adding the path to Makefile by changing FFLAGS variable, but it didn't work. Besides, I copied "mpif.h" from that directory into "src/" but some new errors popped up.

I'm running pencil code on bash on Ubuntu on Windows. I've tried using my teacher's server. Same error was shown. :(

Could someone help me solve this? Thanks in advance :)

Cheers,
Justin

Axel Brandenburg

unread,
Dec 8, 2016, 5:19:17 AM12/8/16
to pencil-co...@googlegroups.com
Hi Justin,
Not sure what is wrong there. By the way,
the latest version you would always get from

https://github.com/pencil-code

e.g. via

svn checkout https://github.com/pencil-code/pencil-code/trunk/ pencil-code

Is that what you did/meant?
Axel
> --
> You received this message because you are subscribed to the Google Groups "pencil-code-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pencil-code-dis...@googlegroups.com.
> To post to this group, send email to pencil-co...@googlegroups.com.
> Visit this group at https://groups.google.com/group/pencil-code-discuss.
> For more options, visit https://groups.google.com/d/optout.

Philippe-A. Bourdin

unread,
Dec 8, 2016, 5:32:57 AM12/8/16
to pencil-code-discuss
Hello Justin Li,

would you please follow our "Quick start guide" that you find on our website under "Documentation"? In case the error persists, the guide also tells you what information we need in order to help you.

In advance, may I guess you use "ubuntu 16.04 LTS" together with the latest "OpenMPI"? I have recently seen that these versions together would NOT compile with our current default compiler settings, which insists on using the Fortran95 standard! If that is the case for you, we will have to find a solution...

Thanks and best greetings,
Philippe.

Justin Li

unread,
Dec 9, 2016, 1:20:47 AM12/9/16
to pencil-code-discuss
Hi Axel,

Yes I got the code from GitHub via git clone.

Best,
Justin

在 2016年12月8日星期四 UTC+8下午6:19:17,Axel写道:

Justin Li

unread,
Dec 9, 2016, 1:23:09 AM12/9/16
to pencil-code-discuss
Hi Philippe,

As you can see, I'm a beginner here, not so familiar with the compiler stuff. Here are the detailed information,

My linux version is "Ubuntu 14.04.5 LTS".

$ source sourceme.sh
PENCIL_HOME = </home/Pegacorn/pencil-code>
Adding /home/Pegacorn/pencil-code/{bin,utils{,/axel},remesh/bin} to PATH

$ echo $PENCIL_HOME/bin
/home/Pegacorn/pencil-code/bin

$ ls -la $PENCIL_HOME/bin
total 786
drwxrwxrwx 2 Pegacorn Pegacorn     0 Dec  9 13:12 .
drwxrwxrwx 2 Pegacorn Pegacorn     0 Dec  9 13:50 ..
-rwxrwxrwx 1 Pegacorn Pegacorn 53538 Dec  9 13:12 auto-test
-rwxrwxrwx 1 Pegacorn Pegacorn  2648 Dec  9 13:12 build-testcase-cvs
-rwxrwxrwx 1 Pegacorn Pegacorn  7285 Dec  9 13:12 copy-snapshots
-rwxrwxrwx 1 Pegacorn Pegacorn  6498 Dec  9 13:12 copy-snapshots_exp
-rwxrwxrwx 1 Pegacorn Pegacorn  1268 Dec  9 13:12 cvs-add-rundir
-rwxrwxrwx 1 Pegacorn Pegacorn  2537 Dec  9 13:12 cvsci_run
-rwxrwxrwx 1 Pegacorn Pegacorn  2332 Dec  9 13:12 cvsci_run_bash
-rwxrwxrwx 1 Pegacorn Pegacorn   392 Dec  9 13:12 dx_get_datadir
-rwxrwxrwx 1 Pegacorn Pegacorn   715 Dec  9 13:12 dx_list_varfiles
-rwxrwxrwx 1 Pegacorn Pegacorn   408 Dec  9 13:12 dx_table2csv
-rwxrwxrwx 1 Pegacorn Pegacorn   586 Dec  9 13:12 dx_var.general
-rw-rw-rw- 1 Pegacorn Pegacorn 71080 Dec  9 13:12 getconf.csh
lrwxrwxrwx 1 Pegacorn Pegacorn     6 Dec  9 13:12 git-pc -> pc_git
-rwxrwxrwx 1 Pegacorn Pegacorn  6565 Dec  9 13:12 gpgrowth
-rwxrwxrwx 1 Pegacorn Pegacorn  4165 Dec  9 13:12 mass-changer.pl
-rwxrwxrwx 1 Pegacorn Pegacorn  5304 Dec  9 13:12 mkdotin
-rwxrwxrwx 1 Pegacorn Pegacorn   580 Dec  9 13:12 mkinpars
-rwxrwxrwx 1 Pegacorn Pegacorn   476 Dec  9 13:12 mkproc-tree
-rwxrwxrwx 1 Pegacorn Pegacorn  1187 Dec  9 13:12 mkwww
-rwxrwxrwx 1 Pegacorn Pegacorn  1239 Dec  9 13:12 move-slice
-rwxrwxrwx 1 Pegacorn Pegacorn  6190 Dec  9 13:12 nl2idl
-rwxrwxrwx 1 Pegacorn Pegacorn  4708 Dec  9 13:12 nl2python
-rwxrwxrwx 1 Pegacorn Pegacorn  2703 Dec  9 13:12 pc_about
-rwxrwxrwx 1 Pegacorn Pegacorn  4296 Dec  9 13:12 pc_autocorrect_config
-rwxrwxrwx 1 Pegacorn Pegacorn 62205 Dec  9 13:12 pc_auto-test
-rwxrwxrwx 1 Pegacorn Pegacorn 12137 Dec  9 13:12 pc_build
-rwxrwxrwx 1 Pegacorn Pegacorn   643 Dec  9 13:12 pc_check_dir
-rwxrwxrwx 1 Pegacorn Pegacorn  1221 Dec  9 13:12 pc_check_revision
-rwxrwxrwx 1 Pegacorn Pegacorn  1630 Dec  9 13:12 pc_cleansrc
-rwxrwxrwx 1 Pegacorn Pegacorn 42573 Dec  9 13:12 pc_codingstyle
-rwxrwxrwx 1 Pegacorn Pegacorn   753 Dec  9 13:12 pc_collect_all
-rw-rw-rw- 1 Pegacorn Pegacorn 13139 Dec  9 13:12 pc_config.sh
-rwxrwxrwx 1 Pegacorn Pegacorn   811 Dec  9 13:12 pc_configtest
-rwxrwxrwx 1 Pegacorn Pegacorn  3838 Dec  9 13:12 pc_copyvar
-rwxrwxrwx 1 Pegacorn Pegacorn  3152 Dec  9 13:12 pc_cvsup
-rwxrwxrwx 1 Pegacorn Pegacorn  6098 Dec  9 13:12 pc_debug
-rwxrwxrwx 1 Pegacorn Pegacorn   767 Dec  9 13:12 pc_deprecated_slice_links
-rwxrwxrwx 1 Pegacorn Pegacorn  1485 Dec  9 13:12 pc_diffruns
-rwxrwxrwx 1 Pegacorn Pegacorn  5740 Dec  9 13:12 pc_dump_config
-rwxrwxrwx 1 Pegacorn Pegacorn  1741 Dec  9 13:12 pc_findconfig
-rwxrwxrwx 1 Pegacorn Pegacorn  8362 Dec  9 13:12 pc_fix_svn_properties
-rw-rw-rw- 1 Pegacorn Pegacorn 28180 Dec  9 13:12 pc_functions.sh
-rwxrwxrwx 1 Pegacorn Pegacorn  2184 Dec  9 13:12 pc_get_param_state
-rwxrwxrwx 1 Pegacorn Pegacorn 25788 Dec  9 13:12 pc_git
-rwxrwxrwx 1 Pegacorn Pegacorn   475 Dec  9 13:12 pc_grep
-rwxrwxrwx 1 Pegacorn Pegacorn   531 Dec  9 13:12 pc_inspectrun
-rwxrwxrwx 1 Pegacorn Pegacorn  2266 Dec  9 13:12 pc_jobtransfer
-rwxrwxrwx 1 Pegacorn Pegacorn  3766 Dec  9 13:12 pc_llsub
-rwxrwxrwx 1 Pegacorn Pegacorn  1379 Dec  9 13:12 pc_localize
-rwxrwxrwx 1 Pegacorn Pegacorn  9445 Dec  9 13:12 pc_mkdatadir
-rwxrwxrwx 1 Pegacorn Pegacorn   416 Dec  9 13:12 pc_mkproctree
-rwxrwxrwx 1 Pegacorn Pegacorn  4616 Dec  9 13:12 pc_newrun
-rwxrwxrwx 1 Pegacorn Pegacorn   202 Dec  9 13:12 pc_news
-rwxrwxrwx 1 Pegacorn Pegacorn  1027 Dec  9 13:12 pc_nowarn_to_kcq
-rwxrwxrwx 1 Pegacorn Pegacorn  2945 Dec  9 13:12 pc_pencil_swap
-rwxrwxrwx 1 Pegacorn Pegacorn    69 Dec  9 13:12 pc_phonelist
-rwxrwxrwx 1 Pegacorn Pegacorn  1793 Dec  9 13:12 pc_piechart
-rwxrwxrwx 1 Pegacorn Pegacorn   665 Dec  9 13:12 pc_qsub
-rwxrwxrwx 1 Pegacorn Pegacorn   575 Dec  9 13:12 pc_reduce_all
-rwxrwxrwx 1 Pegacorn Pegacorn  1471 Dec  9 13:12 pc_rename
-rwxrwxrwx 1 Pegacorn Pegacorn 51463 Dec  9 13:12 pc_run
-rwxrwxrwx 1 Pegacorn Pegacorn  5101 Dec  9 13:12 pc_script_test
-rwxrwxrwx 1 Pegacorn Pegacorn 13427 Dec  9 13:12 pc_setupsrc
-rwxrwxrwx 1 Pegacorn Pegacorn   235 Dec  9 13:12 pc_start
-rwxrwxrwx 1 Pegacorn Pegacorn  1538 Dec  9 13:12 pc_svn_add_rundir
-rwxrwxrwx 1 Pegacorn Pegacorn   349 Dec  9 13:12 pc_svnstatus_ignlinks
-rwxrwxrwx 1 Pegacorn Pegacorn  1473 Dec  9 13:12 pc_svnup
-rwxrwxrwx 1 Pegacorn Pegacorn  3547 Dec  9 13:12 pc_tsnap
-rwxrwxrwx 1 Pegacorn Pegacorn   319 Dec  9 13:12 pc_update_autotest.sh
-rwxrwxrwx 1 Pegacorn Pegacorn   581 Dec  9 13:12 pc_update_validated.sh
-rwxrwxrwx 1 Pegacorn Pegacorn  2069 Dec  9 13:12 pc_upgraderun
-rwxrwxrwx 1 Pegacorn Pegacorn   495 Dec  9 13:12 pc_useutil
-rwxrwxrwx 1 Pegacorn Pegacorn   755 Dec  9 13:12 pc_videofiles
-rwxrwxrwx 1 Pegacorn Pegacorn  1843 Dec  9 13:12 pc_worldmap
-rwxrwxrwx 1 Pegacorn Pegacorn  6018 Dec  9 13:12 pc_xmlexport
-rwxrwxrwx 1 Pegacorn Pegacorn 25109 Dec  9 13:12 pencil-test
-rw-rw-rw- 1 Pegacorn Pegacorn  3778 Dec  9 13:12 README
-rwxrwxrwx 1 Pegacorn Pegacorn   396 Dec  9 13:12 read_videofiles.csh
-rwxrwxrwx 1 Pegacorn Pegacorn 17634 Dec  9 13:12 reaper
-rwxrwxrwx 1 Pegacorn Pegacorn   367 Dec  9 13:12 reload
-rwxrwxrwx 1 Pegacorn Pegacorn  1190 Dec  9 13:12 remote-top
-rwxrwxrwx 1 Pegacorn Pegacorn  1111 Dec  9 13:12 restart-new-dir
-rwxrwxrwx 1 Pegacorn Pegacorn  1075 Dec  9 13:12 restart-new-dir-VAR
-rwxrwxrwx 1 Pegacorn Pegacorn 10234 Dec  9 13:12 run.csh
-rwxrwxrwx 1 Pegacorn Pegacorn   241 Dec  9 13:12 scpdatadir
-rwxrwxrwx 1 Pegacorn Pegacorn  1269 Dec  9 13:12 scp-proc-to-proc
-rwxrwxrwx 1 Pegacorn Pegacorn    61 Dec  9 13:12 setup-src
-rwxrwxrwx 1 Pegacorn Pegacorn  6248 Dec  9 13:12 start.csh
-rwxrwxrwx 1 Pegacorn Pegacorn 15039 Dec  9 13:12 start_run.csh
-rwxrwxrwx 1 Pegacorn Pegacorn  6498 Dec  9 13:12 summarize-history
drwxrwxrwx 2 Pegacorn Pegacorn     0 Dec  9 13:12 test
-rwxrwxrwx 1 Pegacorn Pegacorn    18 Dec  9 13:12 timestr



~/pencil-code/samples/conv-slab$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.


~/pencil-code/samples/conv-slab$ gfortran --version
GNU Fortran (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.

Pegacorn@EXCALIBUR:~/pencil-code/samples/conv-slab$ pc_build --cleanall
Found config file </home/Pegacorn/pencil-code/config/os/GNU_Linux.conf>
Files will be linked to the root code directory '/home/Pegacorn/pencil-code'.
Linking job submission/execution scripts.
Linked root Makefile.
Linking files in '/home/Pegacorn/pencil-code/samples/conv-slab/src'.
No such file: /home/Pegacorn/pencil-code/src/Makefile.machine
No such file: /home/Pegacorn/pencil-code/src/.cvsignore
Linking files in '/home/Pegacorn/pencil-code/samples/conv-slab/src/special'.
Linking files in '/home/Pegacorn/pencil-code/samples/conv-slab/src/pre_and_post_processing'.
Linking files in '/home/Pegacorn/pencil-code/samples/conv-slab/src/magnetic'.
Linking files in '/home/Pegacorn/pencil-code/samples/conv-slab/src/test_methods'.
Linking files in '/home/Pegacorn/pencil-code/samples/conv-slab/src/inactive'.
Linking files in '/home/Pegacorn/pencil-code/samples/conv-slab/src/experimental'.
Linking files in '/home/Pegacorn/pencil-code/samples/conv-slab/src/initial_condition'.
Rebuilding Makefile from Makefile.src.
(cd src; make FROM_PARENT=src/ -f Makefile.src cleann)
make[1]: Entering directory `/home/Pegacorn/pencil-code/samples/conv-slab/src'
rm -f *.x *.o *.a *.mod *.d cparam*.inc cparam_pencils*.inc *.il
rm -f special/*.o special/*.mod
rm -f initial_condition/*.o initial_condition/*.mod
rm -f experimental/*.o experimental/*.mod
rm -f pre_and_post_processing/*.o pre_and_post_processing/*.x
rm -f .current-precision
rm -f *.dot *.ps  # Dependency diagram files
rm -f work.pc work.pcl .build*
printf "# %s\n" "Empty" "(This file was written by 'make')" > Makefile.inc
printf "# %s\n" "Empty" "(This file was written by 'make')" > Makefile-standard.inc
rm -f Makefile src/Makefile Makefile_inc TAGS  *mpicomm_.f90 mpicomm_double*.f90
rm -rf semiauto-conf_tmp f90_qnd_log_dir
rm -f *.inc && touch Makefile.inc Makefile-standard.inc
make  -f Makefile.src Makefile
make[2]: Entering directory `/home/Pegacorn/pencil-code/samples/conv-slab/src'
scripts/check-mkfile Makefile.local Makefile.src
env ADAPT_MKFILE= scripts/adapt-mkfile Makefile.src Makefile
make[2]: Leaving directory `/home/Pegacorn/pencil-code/samples/conv-slab/src'
make[1]: Leaving directory `/home/Pegacorn/pencil-code/samples/conv-slab/src'

Pegacorn@EXCALIBUR:~/pencil-code/samples/conv-slab$ pc_build -d
          'Makefile' => [
                          'MAKE_VAR1 = -j',
                          'FFLAGS_DOUBLE = -r8',
                          'CFLAGS_DOUBLE = -DDOUBLE_PRECISION',
                          'LD_MPI =',
                          'CFLAGS_FFTW3 =',
                          'FFLAGS_FFTW3 =',
                          'LD_FFTW3 =',
                          'CFLAGS_FFTW2 =',
                          'FFLAGS_FFTW2 =',
                          'LD_FFTW2 =',
                          'FC = gfortran',
                          'F77 = $(FC)',
                          'FFLAGS += -O',
                          'FFLAGS_DOUBLE = -fdefault-real-8 -fdefault-double-8',
                          'FSTD_95 = -std=f95',
                          'FSTD_2003 = -std=f2003',
                          'CC = gcc',
                          'CFLAGS = -DFUNDERSC=1',
                          'CFLAGS_DOUBLE = -DDOUBLE_PRECISION'
                        ]
        };
Running make '-j' 'FFLAGS_DOUBLE=-fdefault-real-8 -fdefault-double-8' 'CFLAGS_DOUBLE=-DDOUBLE_PRECISION' 'LD_MPI=' 'CFLAGS_FFTW3=' 'FFLAGS_FFTW3=' 'LD_FFTW3=' 'CFLAGS_FFTW2=' 'FFLAGS_FFTW2=' 'LD_FFTW2=' 'FC=gfortran' 'F77=$(FC)
' 'FFLAGS=-O' 'FSTD_95=-std=f95' 'FSTD_2003=-std=f2003' 'CC=gcc' 'CFLAGS=-DFUNDERSC=1' 'default_to_be'
MAKING src/Makefile.inc
touch src/.build-history
echo Pegacorn"@"`hostname` "("`date`")" >> src/.build-history
( cd src && \
          echo "===== " make FROM_PARENT=src/ -f Makefile.src code "====="; \
          make FROM_PARENT=src/ -f Makefile.src default_to_be \
        )
=====  make FROM_PARENT=src/ -f Makefile.src code =====
make[1]: Entering directory `/home/Pegacorn/pencil-code/samples/conv-slab/src'
${PENCIL_HOME}/utils/pc_identify_revision --reset
make -f Makefile.src  start.o run.o combine_videofiles.o read_videofiles.o read_all_videofiles.o read_vectorfiles.o pre_and_post_processing/pc_collect.o pre_and_post_processing/pc_reduce.o pre_and_post_processing/pc_distribute.
o pre_and_post_processing/pc_distribute_z.o pre_and_post_processing/pc_extract.o pre_and_post_processing/pc_configtest.o pre_and_post_processing/pc_tecplot.o pre_and_post_processing/pc_tecplot_solid.o start.x run.x combine_vide
ofiles.x read_videofiles.x read_all_videofiles.x read_vectorfiles.x pre_and_post_processing/pc_collect.x pre_and_post_processing/pc_reduce.x pre_and_post_processing/pc_distribute.x pre_and_post_processing/pc_distribute_z.x pre_
and_post_processing/pc_extract.x pre_and_post_processing/pc_configtest.x pre_and_post_processing/pc_tecplot.x pre_and_post_processing/pc_tecplot_solid.x
make[2]: Entering directory `/home/Pegacorn/pencil-code/samples/conv-slab/src'
gfortran -O     -std=f95 -o mpicomm.o -c mpicomm.f90
make[2]: `combine_videofiles.o' is up to date.
make[2]: `read_videofiles.o' is up to date.
make[2]: `read_all_videofiles.o' is up to date.
make[2]: `read_vectorfiles.o' is up to date.
make[2]: `combine_videofiles.x' is up to date.
make[2]: `read_videofiles.x' is up to date.
make[2]: `read_all_videofiles.x' is up to date.
make[2]: `read_vectorfiles.x' is up to date.
mpicomm.f90:55: Error: Can't open included file 'mpif.h'
make[2]: *** [mpicomm.o] Error 1
make[2]: Leaving directory `/home/Pegacorn/pencil-code/samples/conv-slab/src'
make[1]: *** [code] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/Pegacorn/pencil-code/samples/conv-slab/src'
make: *** [default_to_be] Error 2
'make -j FFLAGS_DOUBLE=-fdefault-real-8 -fdefault-double-8 CFLAGS_DOUBLE=-DDOUBLE_PRECISION LD_MPI= CFLAGS_FFTW3= FFLAGS_FFTW3= LD_FFTW3= CFLAGS_FFTW2= FFLAGS_FFTW2= LD_FFTW2= FC=gfortran F77=$(FC) FFLAGS=-O FSTD_95=-std=f95 FS
TD_2003=-std=f2003 CC=gcc CFLAGS=-DFUNDERSC=1 default_to_be' failed: <>

Pegacorn@EXCALIBUR:~/pencil-code/samples/conv-slab$ mpicc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Pegacorn@EXCALIBUR:~/pencil-code/samples/conv-slab$ mpif90 --version
GNU Fortran (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.

Pegacorn@EXCALIBUR:~/pencil-code/samples/conv-slab$ mpiexec --version
HYDRA build details:
    Version:                                 3.0.4
    Release Date:                            Wed Apr 24 10:08:10 CDT 2013
    CC:                              cc -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro
    CXX:                             c++ -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro
    F77:                             gfortran -g -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro
    F90:                             gfortran  -Wl,-Bsymbolic-functions -Wl,-z,relro
    Configure options:                       '--disable-option-checking' '--prefix=/usr' '--build=x86_64-linux-gnu' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=
/etc' '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' '--enable-shared' '--enable-fc' '--disable-rpath'
'--disable-wrapper-rpath' '--sysconfdir=/etc/mpich' '--libdir=/usr/lib/x86_64-linux-gnu' '--includedir=/usr/include/mpich' '--docdir=/usr/share/doc/mpich' '--with-hwloc-prefix=system' '--enable-checkpointing' '--with-hydra-ckpo
intlib=blcr' 'build_alias=x86_64-linux-gnu' 'MPICHLIB_CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'MPICHLIB_CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -W
error=format-security' 'MPICHLIB_FFLAGS=-g -O2' 'MPICHLIB_FCFLAGS=-g -O2' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -
Werror=format-security -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro ' 'CPPFLAGS=-D_FORTIFY_SOURCE=2 -I/build/buildd/mpich-3.0.4/src/mpl/include -I/build/buildd/mpich-3.0.4/src/mpl/include -I/build/buildd/mpich-3.0.4/src/
openpa/src -I/build/buildd/mpich-3.0.4/src/openpa/src -I/build/buildd/mpich-3.0.4/src/mpi/romio/include' 'CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -g -O2 -fstack-protector --p
aram=ssp-buffer-size=4 -Wformat -Werror=format-security -O2' 'F77=gfortran' 'FFLAGS=-g -O2 -g -O2 -O2' 'FC=gfortran' '--cache-file=/dev/null' '--srcdir=.' 'CC=cc' 'LIBS=-lrt -lcr -lpthread '
    Process Manager:                         pmi
    Launchers available:                     ssh rsh fork slurm ll lsf sge manual persist
    Topology libraries available:            hwloc
    Resource management kernels available:   user slurm ll lsf sge pbs cobalt
    Checkpointing libraries available:       blcr
    Demux engines available:                 poll select

Thank you sooo much for your help. :)

Best regards,
Justin 

Philippe-A. Bourdin

unread,
Dec 9, 2016, 8:27:27 AM12/9/16
to pencil-code-discuss
Hello Justin Li,

from the version you use, your installation looks good to me.
Because you like to use MPI, use need at least this option for compilation:

pc_build -f GNU-GCC_MPI

This should work for you out-of-the-box.
You may also create a "host-configuration" file for your computer, which is explained in the quick start guide and also in the manual.

Thanks and best greetings,
Philippe Bourdin.

Justin Li

unread,
Dec 9, 2016, 10:03:39 AM12/9/16
to pencil-code-discuss
Hi Philippe,

Many thanks for your help! I've tried pc_build -f GNU-GCC_MPI. The compilation process looks good now. No error occured. However, when I proceed to "pc_start", there are still some problems with MPI. I've tested conv-slab, interstellar, 2d-tests/Kelvin_ Helmholtz. interstellar is doing great, but conv-slab and Kelvin-Helmholtz gave me the same error after the "pc_start" command. Any ideas? Here are the outputs

double check that everything has shut down cleanly.

  Reason:     Before MPI_INIT completed
  Local host: EXCALIBUR
  PID:        7078
--------------------------------------------------------------------------
[EXCALIBUR:07079] [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file ess_singleton_module.c at line 231
[EXCALIBUR:07079] [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file ess_singleton_module.c at line 140
[EXCALIBUR:07079] [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file runtime/orte_init.c at line 128
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems.  This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

  orte_ess_set_name failed
  --> Returned value A system-required executable either could not be found or was not executable by this user (-127) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like MPI_INIT failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during MPI_INIT; some of which are due to configuration or environment
problems.  This failure appears to be an internal failure; here's some
additional information (which may only be relevant to an Open MPI
developer):

  ompi_mpi_init: orte_init failed
  --> Returned "A system-required executable either could not be found or was not executable by this user" (-127) instead of "Success" (0)
--------------------------------------------------------------------------
[EXCALIBUR:7079] *** An error occurred in MPI_Init
[EXCALIBUR:7079] *** on a NULL communicator
[EXCALIBUR:7079] *** Unknown error
[EXCALIBUR:7079] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
--------------------------------------------------------------------------
An MPI process is aborting at a time when it cannot guarantee that all
of its peer processes in the job will be killed properly.  You should
double check that everything has shut down cleanly.

  Reason:     Before MPI_INIT completed
  Local host: EXCALIBUR
  PID:        7079
--------------------------------------------------------------------------

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   EXIT CODE: 1
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================

Again, thank you very much! :)

Best regards,
Justin

Justin Li

unread,
Dec 9, 2016, 10:43:44 AM12/9/16
to pencil-code-discuss
Hi Philippe,

I think I've asked a dumb question. The problem is fixed. The reason I think is that I have mpich & openmpi on my system. It all works great now after I removed mpich. 

You guys are fantastic. I would like to express my most sincere gratitude and appreciation for your help! :)

Best regards,
Justin

On Friday, December 9, 2016 at 9:27:27 PM UTC+8, Philippe-A. Bourdin wrote:
Reply all
Reply to author
Forward
0 new messages