-
Notifications
You must be signed in to change notification settings - Fork 117
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
Error in GNU/Linux Ubuntu 22.04 #249
Comments
Howdy Mauricio,
I keep meaning to post this and/or send it to David, so thanks for bringing
it up. These are errors that come from a dependency on prior versions of
MPI. For V2+, you can update a few lines in 4 files to bring TauDEM into
V2+ compliance. This was something that deprecated in V2 but still
supported for legacy, but removed completely in V3.
You need to update files that include the following from:
MPI_Type_create_struct calls to MPI_Type_create_struct, a simple
find/replace,
and:
MPI_Type_extent(MPI_LONG, &extent) to MPI_Aint
lb;MPI_Type_get_extent(MPI_LONG, &lb, &extent)
the second of which is less simple depending on your editor.
If you are *nix friendly:
In your "terminal" run the code per the
…---In Terminal---
cd ~/src/ # Set your directory to your home directory
git clone https://github.com/dtarb/TauDEM.git
mkdir ~/src/TauDEM/bin
cd ~/src/TauDEM/src
make
# NOOOOOOO AAAAAAAGGGGGGGHHHHHHH WHAT HAPPENED ROJA?!?!?!
# https://www.mpich.org/static/docs/v3.2/www3/MPI_Type_struct.html
# Here, we have found a few updates that need to be made
# to the code for updating
# https://www.mpich.org/static/docs/v3.2/www3/MPI_Type_struct.html
grep MPI_Type_extent *
grep MPI_Type_struct *
sed -i -e 's/MPI_Type_struct/MPI_Type_create_struct/g' linklib.h
# yes, this next line is very small font, but it is one line so...
sed -i -e 's/MPI_Type_extent(MPI_LONG, \&extent)/MPI_Aint
lb\;MPI_Type_get_extent(MPI_LONG, \&lb, \&extent)/g' linklib.h
# Now let's try make again!
make
On Tue, Mar 21, 2023 at 9:39 AM Maurício Vancine ***@***.***> wrote:
Dear,
I'm trying to compile on Ubuntu, but I had this error.
Could you help?
Thank you.
Error:
In file included from /home/mude/Downloads/TauDEM/src/streamnet.cpp:56:
/home/mude/Downloads/TauDEM/src/linklib.h: In function ‘bool
sendLink(int32_t, int)’:
/home/mude/Downloads/TauDEM/src/linklib.h:281:9: error: ‘MPI_Type_extent’
was not declared in this scope; did you mean ‘MPI_Type_get_extent’?
281 | MPI_Type_extent(MPI_LONG, &extent);
| ^~~~~~~~~~~~~~~
| MPI_Type_get_extent
/home/mude/Downloads/TauDEM/src/linklib.h:286:9: error: ‘MPI_Type_struct’
was not declared in this scope; did you mean ‘MPI_Type_size_x’?
286 | MPI_Type_struct(2,blockcounts,offsets,oldtypes,&PointType);
| ^~~~~~~~~~~~~~~
| MPI_Type_size_x
/home/mude/Downloads/TauDEM/src/linklib.h: In function ‘bool
recvLink(int)’:
/home/mude/Downloads/TauDEM/src/linklib.h:349:9: error: ‘MPI_Type_extent’
was not declared in this scope; did you mean ‘MPI_Type_get_extent’?
349 | MPI_Type_extent(MPI_LONG, &extent);
| ^~~~~~~~~~~~~~~
| MPI_Type_get_extent
/home/mude/Downloads/TauDEM/src/linklib.h:354:9: error: ‘MPI_Type_struct’
was not declared in this scope; did you mean ‘MPI_Type_size_x’?
354 | MPI_Type_struct(2,blockcounts,offsets,oldtypes,&PointType);
| ^~~~~~~~~~~~~~~
| MPI_Type_size_x
/home/mude/Downloads/TauDEM/src/streamnet.cpp: In function ‘int
reachshape(long int*, float*, float*, float*, double*, double*, long int,
tiffIO&)’:
/home/mude/Downloads/TauDEM/src/streamnet.cpp:347:24: warning: ignoring
return value of ‘OGRErr OGR_L_CreateFeature(OGRLayerH, OGRFeatureH)’
declared with attribute ‘warn_unused_result’ [-Wunused-result]
347 | OGR_L_CreateFeature( hLayer1, hFeature1 ); //adding feature
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
—
Reply to this email directly, view it on GitHub
<#249>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXH4LP2G2CCGU3BEYJWATDW5HDT5ANCNFSM6AAAAAAWCT4EQE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Dear @drfuka, Now, I'm good, thanks for asking. I hope you are too. The compilation worked! Thank you so much for your help! Kind regards. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear,
I'm trying to compile on Ubuntu, but I had this error.
Could you help?
Thank you.
Error:
In file included from /home/mude/Downloads/TauDEM/src/streamnet.cpp:56:
/home/mude/Downloads/TauDEM/src/linklib.h: In function ‘bool sendLink(int32_t, int)’:
/home/mude/Downloads/TauDEM/src/linklib.h:281:9: error: ‘MPI_Type_extent’ was not declared in this scope; did you mean ‘MPI_Type_get_extent’?
281 | MPI_Type_extent(MPI_LONG, &extent);
| ^~~~~~~~~~~~~~~
| MPI_Type_get_extent
/home/mude/Downloads/TauDEM/src/linklib.h:286:9: error: ‘MPI_Type_struct’ was not declared in this scope; did you mean ‘MPI_Type_size_x’?
286 | MPI_Type_struct(2,blockcounts,offsets,oldtypes,&PointType);
| ^~~~~~~~~~~~~~~
| MPI_Type_size_x
/home/mude/Downloads/TauDEM/src/linklib.h: In function ‘bool recvLink(int)’:
/home/mude/Downloads/TauDEM/src/linklib.h:349:9: error: ‘MPI_Type_extent’ was not declared in this scope; did you mean ‘MPI_Type_get_extent’?
349 | MPI_Type_extent(MPI_LONG, &extent);
| ^~~~~~~~~~~~~~~
| MPI_Type_get_extent
/home/mude/Downloads/TauDEM/src/linklib.h:354:9: error: ‘MPI_Type_struct’ was not declared in this scope; did you mean ‘MPI_Type_size_x’?
354 | MPI_Type_struct(2,blockcounts,offsets,oldtypes,&PointType);
| ^~~~~~~~~~~~~~~
| MPI_Type_size_x
/home/mude/Downloads/TauDEM/src/streamnet.cpp: In function ‘int reachshape(long int*, float*, float*, float*, double*, double*, long int, tiffIO&)’:
/home/mude/Downloads/TauDEM/src/streamnet.cpp:347:24: warning: ignoring return value of ‘OGRErr OGR_L_CreateFeature(OGRLayerH, OGRFeatureH)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
347 | OGR_L_CreateFeature( hLayer1, hFeature1 ); //adding feature
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered: