Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue installation ED2 Model. #401

Open
Nikhil240393 opened this issue Apr 29, 2024 · 10 comments
Open

Issue installation ED2 Model. #401

Nikhil240393 opened this issue Apr 29, 2024 · 10 comments

Comments

@Nikhil240393
Copy link

Hello All,

I tryin to install ED2 model but below is the error I ma getting while doing so, can some please help me with this error. please find error screen shot.

ED2

I have followed steps from the GitHub for installation.

@mpaiao
Copy link
Contributor

mpaiao commented Apr 29, 2024

Hello @Nikhil240393 are you planning on running ED2 for a single site or for a region? If the goal is to run for a single site, I suggest compiling the model without MPI configuration. These errors are actually caused by inconsistencies in the MPI functions, not ED2.

To disable MPI, go to ED/build/make and edit the include.mk.XXXX file you are using, then change the following:

If using Intel compilers

F_COMP=ifort
C_COMP=icc
LOADER=ifort

If using GNU compilers

F_COMP=gfortran
C_COMP=gcc
LOADER=gfortran

And make sure all the following in blank:

MPI_PATH=
PAR_INCS=
PAR_LIBS=
PAR_DEFS=

Note that disabling MPI has no side effect on -fopenmp (shared memory parallelisation), that option will still work fine. MPI libraries are needed only when running a regional simulation coupled with the atmospheric model (BRAMS).

@Nikhil240393
Copy link
Author

Hello @mpaiao Thank you so much for your such quick response on my issue.

I have one last question
I am following the GitHub instructions for installing ED2 model which is. "https://github.com/EDmodel/ED2/wiki/Quick-start"
in these installtion steps they have mentioned about below "include.mk" files

include.mk.bnl. Brookhaven National Labs.
include.mk.bu_geo. Boston University.
include.mk.cannon. Harvard's Cannon cluster (formerly known as Odyssey).
include.mk.sdumont. Santos Dumont Cluster (LNCC).
include.mk.ugent. Ghent University.

my question is the changes which you have suggested above do I need to make those in all these files or is there any specific I have to look for.

for installation I am using command "./install.sh -k E -p gfortran" on my Mac/linux environment

Thank you again for your quick help

@Nikhil240393
Copy link
Author

Hello @mpaiao I was able to solve that error with the instructions given by you.

Thank you so much of your help in this issue

@Nikhil240393
Copy link
Author

Nikhil240393 commented Apr 29, 2024

Hello @DanielNScott @mpaiao

I facing another issue while installation of ED2 model below is the error massage screen shot

Screenshot 2024-04-29 at 1 39 59 PM

but when I am checking at location ED/src/memory/hdf5_coms.f90 file is available at the location Still I am getting this error.

I am not able to under stand what I am missing here. Also on my HPC server I have tried loading modules for Hdf5 still same error.

for installation I am using command "./install.sh -k E -p gfortran" on my Mac/linux environment

Can you please help me in resolving this error.

Thank you in advance

@mpaiao
Copy link
Contributor

mpaiao commented Apr 30, 2024

You need to install HDF5 libraries. It seems you are using a Mac, in which case I suggest installing HomeBrew and installing the hdf5 libraries from there (I think it's brew install hdf5). Everything from HomeBrew is installed in directory /usr/local, so you just need to update the path in the include.mk.gfortran to be something like:

ZLIB_PATH=/usr/local
HDF5_PATH=/usr/local
HDF5_INCS=-I$(HDF5_PATH)/include
HDF5C_INCS=$(HDF5_INCS)
HDF5_LIBS=-L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5_fortran -lhdf5 -lhdf5_hl

I think HomeBrew will also install its own version of gcc/gfortran to install hdf5, so it may be a good idea to use HomeBrew's gfortran/gcc to compile ED2 too. To do this, figure out which version HomeBrew installs by looking for gfortran/gcc in /usr/local/bin. Typically it will be something like gcc-13 and gfortran-13 (the number may change depending on the version). Then update the compiles accordingly:

F_COMP=/usr/local/bin/gfortran-13
C_COMP=/usr/local/bin/gcc-13
LOADER=/usr/local/bin/gfortran-13

Another important detail, Mac systems have some settings that seem to prevent programs to allocate very large arrays, so the code needs to downsize the memory requirements. Make sure that you set the following in your include.mk file:

CMACH=MAC_OS_X
FC_TYPE=GNU

@Nikhil240393
Copy link
Author

Nikhil240393 commented May 1, 2024

Hello @mpaiao,

With you help I was able resolve previous error, Thank you so much for your help.

As I have moved for forward in this I am facing new error as below
Screenshot 2024-05-01 at 2 02 21 AM

Screenshot 2024-05-01 at 2 03 25 AM

As suggested I have made the changes in include.mk.gfortran file

Screenshot 2024-05-01 at 2 04 45 AM Screenshot 2024-05-01 at 2 05 09 AM

Just to let you know I am installing this ED model on both Mac and HPC environment.

Thank you in advance

@mpaiao
Copy link
Contributor

mpaiao commented May 1, 2024

This is probably happening because you did not specify the paths for the zlib and hdf5 libraries.

HDF5_LIBS=-L$(ZLIB_PATH)/lib -lz -L$(HDF5_PATH)/lib -lhdf5_fortran -lhdf5 -lhdf5_hl

And make sure you have a file libz.a and/or libz.dylib in the HomeBrew path (ZLIB_PATH/lib), and that you have the files libhdf5.a, libhdf5_fortran.a and libhdf5_hl.a (and/or the dylib counterparts).

Also I think that the regular syntax in Makefile is to use parenthesis for the variables, not curly brackets — $(HDF5_PATH), not ${HDF5_PATH}. But I am not totally sure about this one.

@Nikhil240393
Copy link
Author

HEllo @mpaiao,

Thank you so much for you help, suggested changes worked for and ED2 model is installed on my local MAC now

But while running the model I am getting below err

image

I am not able to understand what segmentation fault is? is it the memory issue? as in my Mac memory is not sufficient for running model or this is else?

please help

Thanks in advance

Regards,
Nikhil.

@mpaiao
Copy link
Contributor

mpaiao commented May 5, 2024

It seems you have variables incorrectly set in your nameless. (ED2IN) file. Function filelist_f seems to be looking for files with path and prefix /mypath/myprefix, which is a dummy value we leave in the namelist to be replaced with the actual path and prefix of the files.

@Nikhil240393
Copy link
Author

Nikhil240393 commented May 5, 2024

Hello @mpaiao,

I have question, where are the prefix files located? do we need to create them manually? because I am not able to find any XML files those are checked while XML config while running model, Location where I am looking for XML file is the ED2 folder structure where my ED model is installed.

image

Below are few more points I have

  1. please let me know path to what should I specify in "/mypath/myprefix"
  2. Function filelist_f is not present in ED2IN file
  3. generic-prefix.xml I have created manually is it correct way?

Content in generic-prefix.xml after running model

image

I possible for you can we have zoom call or google meeting today or tomorrow anytime as per your availability.

sorry for asking such dumb questions.

Thank and Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants