Comments (7)
I believe that I figured it out.
The file <GCHP>/ESMF/build_config/*.*.default/build_rules.mk
adds the -lmpi_cxx
flag to both $ESMF_F90LINKLIBS
and $ESMF_CXXLINKLIBS
. The documentation (source: Building and Installing ESMF) for $ESMF_F90LINKLIBS
and $ESMF_CXXLINKLIBS
says
ESMF_F90LINKLIBS
Possible value: list of libraries, each prepended with -l
Prepend libraries to the list of libraries the ESMF build system determines.
To my eyes, it appears that <GCHP>/ESMF/build_config/<platform>.<compiler>.default/build_rules.mk
is trying to define the MPI runtime as libmpi_cxx.so
.
If I understand correctly, my MPI runtime library is libmpi.so
as I got with the following:
$ mpif90 --showme:libs
mpi
This also makes sense since libmpi.so
was lised in my /usr/local/lib
directory (see my opening comment).
Solution
For my system the ESMF build_rules.mk file was <GCHP>/ESMF/build_config/Linux.gfortran.default/build_rules.mk
. In this file, I simply changed -lmpi_cxx
to -lmpi
. After doing this GCHP compiled successfully.
Below is a diff of this file
@@ -68,12 +68,12 @@ ifeq ($(ESMF_COMM),openmpi)
# OpenMPI --------------------------------------------------
ESMF_CXXCOMPILECPPFLAGS+= -DESMF_NO_SIGUSR2
ESMF_F90DEFAULT = mpif90
-ESMF_F90LINKLIBS += -lmpi_cxx
+ESMF_F90LINKLIBS += -lmpi
ESMF_CXXDEFAULT = mpicxx
# Need to change -lmpi_f77 to -lmpi_cxx to get ESMF to compile w/ OpenMPI
# (ewl, 6/18/2018)
#ESMF_CXXLINKLIBS += -lmpi_f77
-ESMF_CXXLINKLIBS += -lmpi_cxx
+ESMF_CXXLINKLIBS += -lmpi
ESMF_MPIRUNDEFAULT = mpirun $(ESMF_MPILAUNCHOPTIONS)
ESMF_MPIMPMDRUNDEFAULT = mpiexec $(ESMF_MPILAUNCHOPTIONS)
else
from gchp_legacy.
Thanks for reporting and glad that you have figured out the issue!
A side point: from your Singularity file, looks like your are installing gfortran 4.x. I found that old versions of gfortran cause run time errors (related to string processing in MAPL). gfortran 7.x works fine.
from gchp_legacy.
Looks like -lmpi_cxx
is already removed in a recent commit (fdd8afe) by @lizziel
You are using an update-to-date version of GCHP code?
from gchp_legacy.
Thanks for the tip! I did have a runtime error from MAPL when I launched GCHP (I don't remember what it said), but I left debugging that for tomorrow—I'll start with trying version 7.x!
Regarding my GCHP version, I am using the most up-to-date commit (205f019). It appears that fdd8afe updated $ESMF_CXXLINKLIBS
and $ESMF_F90LINKLIBS
for Linux.intel.default/build_rules.mk
, but Linux.gfortran.default/build_rules.mk
is the file that is used for my container.
Lines 71 and 76 were the ones that I changed to just -lmpi
. I have only tried to compile GCHP with Open MPI 2.1.2, however, so I can't speak to the consistency of the library name (libmpi.so
) across different OMPI versions and other MPI implementations.
Cheers,
Liam
from gchp_legacy.
Hi Liam,
Unfortunately those build_rules.mk files have a lot of hard-coded flags that may or may not work on different systems. Playing around with these may be necessary for different versions of OS, compiler, and MPI. I commit what is necessary to get things working for our testing but unfortunately there is no one-size-fits-all solution.
from gchp_legacy.
Hi Lizzie,
Okay I see, that makes sense. I have got GCHP compiling now so I will close this issue.
Thanks,
Liam
from gchp_legacy.
Hit the same issue when trying gcc 7.3.0 + openmpi 3.1.3.
To be consistent with fdd8afe, I suggest removing -lmpi_cxx
in ESMF/build_config/Linux.gfortran.default/build_rules.mk
from gchp_legacy.
Related Issues (20)
- [BUG/ISSUE] Incorrect regridding if file latitude data ends in +/- 90 HOT 4
- [BUG/ISSUE] Not printing the missing HEMCO data file that causes model crash HOT 13
- [BUG/ISSUE] Change in MAPL vertical flip rules impacting mesospheric chemistry HOT 1
- [BUG/ISSUE] H2O2AfterChem vertically flipped in restart HOT 2
- [BUG/ISSUE] MODIS LAI not properly updated at correct time HOT 6
- [BUG/ISSUE] Run failure in transport tracers simulation with 12.6.2 HOT 1
- [FEATURE REQUEST] ESMF v8 public release HOT 1
- [BUG/ISSUE] Run crashes in MAPL when running full chemistry simulation at c360 HOT 6
- [QUESTION]Should it make cleanup_output everytime at the beginging of smulation? HOT 4
- [BUG/ISSUE] Fullchem run failure in 12.7.0+ at c180+ due to reduced timesteps HOT 4
- [DISCUSSION] This repository will be retired in version 13.0.0
- [BUG/ISSUE] Monthly diagnostics incorrect for Feb in leap years if using multi-run option HOT 1
- [QUESTION] Error in MAPL_IO.F90 reading restart file?
- [BUG/ISSUE]Invoking MPI_ABORT causes Open MPI to kill all MPI processes when run GCHP at c360 HOT 9
- [BUG/ISSUE]make build_all, gchp error in ESMF: cpp/node/detail/node_iterator.h(64): error: namespace "std" has no member "addressof" HOT 2
- [BUG/ISSUE] compiling GCHP 12.8.2 HOT 8
- [QUESTION] Compiling GCHP failed HOT 5
- [BUG/ISSUE] Non-advected species concentrations not copied for output restart file
- [QUESTION] The dimensions of gchp restart file HOT 3
- [QUESTION] Why does GCHP fail when meteorology turned on in 12.9.3 HEMCO_Config.rc HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gchp_legacy.