Comments (11)
@cponder: It looks like you're trying to build the atmosphere model, so you should probably look at their users guide
Chapter 3 has instructions for how to build the model, but the short answer to your question is that all netcdf libraries must be installed in the same location and you pass that location using the NETCDF environment variable. Once you set that, all the library information is internally dealt with (i.e. you don't need to set LDFLAGS, LIBS, FFLAGS, or FCFLAGS).
from mpas-model.
The PIO, NETCDF and PNETCDF variables are already set in my envoronment.
Note that NetCDF-C and NetCDF-F are no longer bundled-together, and are released with different version numbers.
Do you have a NETCDF_F environment variable?
from mpas-model.
@cponder No, you have to install NetCDF-C and NetCDF-F into the same directory. Even if they have different version numbers.
from mpas-model.
Why don't you just fix the Makefile?
from mpas-model.
@cponder Most of our builds use older netcdf libraries that are bundled together. It's possible for us to change the Makefile to have a NETCDF_F flag in the future, but it likely won't happen in a short amount of time.
from mpas-model.
I don't get why the compiler doesn't pick up the
-L$NETCDF_F/lib -lnetcdff
settings from the LDFLAGS or FCFLAGS variables, are you clearing these?
from mpas-model.
It's not that we're clearing them. We just don't use them. So, setting these variables doesn't affect the build at all.
from mpas-model.
This patch to the top-level Makefile worked:
269 ifneq "$(NETCDF_F)" ""
270 CPPINCLUDES += -I$(NETCDF_F)/include
271 FCINCLUDES += -I$(NETCDF_F)/include
272 LIBS += -L$(NETCDF_F)/lib -lnetcdff
273 endif
Note that (1) it only uses the NETCDF_F it is set, and the
263 ifneq ($(wildcard $(NETCDF)/lib/libnetcdff.*), ) # CHECK FOR NETCDF4
check is still in place, so a merged NetCDF-C + NetCDF-F directory will still work.
Can you add this to your next bugfix release?
The patch doesn't add any autodetecting, you have to explicitly use the NETCDF_F variable.
Also it doesn't force the user to set NETCDF_F, although in the future we might want to remove the libnetcdff autodetection from NETCDF and simply set NETCDF_F=$NETCDF as the default.
from mpas-model.
This one changes more lines but I think is cleaner overall
257 ifneq "$(NETCDF)" ""
258 CPPINCLUDES += -I$(NETCDF)/include
259 FCINCLUDES += -I$(NETCDF)/include
260 LIBS += -L$(NETCDF)/lib -lnetcdf
261 ifneq ($(wildcard $(NETCDF)/lib/libnetcdff.*), ) && ifeq "$(NETCDF_F)" "" # CHECK FOR NETCDF4
262 NETCDF_F=$(NETCDF)
263 endif # CHECK FOR NETCDF4
264 endif
265
266 ifneq "$(NETCDF_F)" ""
267 CPPINCLUDES += -I$(NETCDF_F)/include
268 FCINCLUDES += -I$(NETCDF_F)/include
269 LIBS += -L$(NETCDF_F)/lib -lnetcdff
270 endif
So $NETCDF_F is used if it is set; otherwise we autodetect the $NETCDF/lib/libnetcdff.* as before.
from mpas-model.
Doug -- I'm having trouble building the PIO library with OpenMPI.
Has MPAS-A only been tested with the Intel compiler & Intel MPI?
-- Carl
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
from mpas-model.
@cponder We've primarily used MPICH with MPAS-Atmosphere, though I believe a number of MPAS-Ocean developers use OpenMPI. Generally, I don't think there's a preference on the MPAS side for any particular MPI implementation. If this is an issue in building PIO, however, you might like to get in contact with the PIO developers, since PIO is a library developed completely independently from MPAS.
from mpas-model.
Related Issues (20)
- MPAS-O init run HOT 1
- Leading backslash omitted on topography address for init_atmosphere
- Threshold value for sea ice flag update too low in mpas_atmphys_initialize_real?
- Namelist option config_blend_bdy_terrain in &vertical_grid causing failure for static processing
- MPAS should generate graphs inline HOT 1
- can intel MPI+openmp hybrid mode be implemented on MPAS software? HOT 1
- normalVelocity's divergence problem in MPAS-O
- xtime in MPAS-Ocean
- Variable relhum in MPAS-A
- Internal Compiler Errors in *_core_interface routines with Intel OneAPI compilers
- surfaceStress HOT 1
- Surface low value area in MPAS-O HOT 1
- Remapping of terrain height and other static fields is incorrect for `bdyMaskCell == 7` cells HOT 2
- SIGFPE: Floating-point exception in Thompson microphysics v8.0.1 when DEBUG=true HOT 2
- MPAS-A Tracer LBC not diffusing
- Updated mpas_halo communication routines do not support integer fields
- ERROR: NaN Detected HOT 1
- Compiling MPAS-Model fails when using double precision. HOT 1
- Proposed implementation of new tendency diagnostics package and significant revisions to PV diagnostics package in MPAS-A
- v8.2.0 crashes with null pointer for nifa_p with DEBUG=true HOT 1
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 mpas-model.