first trapping example problems

36 views
Skip to first unread message

Muhammad

unread,
Apr 9, 2021, 6:07:55 AM4/9/21
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi: 

I have mrst 2019a and I'm trying to run firstTrappingExample.m from the co2module. The problem that that matlab outputs is "Undefined function or variable 'dfs_mex'.". 

I'm running mrst on a mac. 

I'm not sure how to go about solving this problem. Any advice would be appreciated. Thanks. 

Muhammad

Knut-Andreas Lie

unread,
Apr 9, 2021, 11:07:09 AM4/9/21
to Muhammad, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Muhammad,

This error message indicates that MATLAB/MRST is not able to find a function from the MATLAB Boost Graph Library, which is used in the trapping analysis. I suggest that you try to run the downloadMBGL function supplied in the matlab_bgl module. If you have already downloaded the software and it is still not working, it may be that MATLAB has not been able to compile it and create the necessary mex interface.

 - Knut-Andreas

--
Knut-Andreas Lie, Professor, PhD
Chief Scientist, SINTEF Digital, Mathematics & Cybernetics, Oslo
Phone: +47 930 58 721 (mobile)
http://folk.ntnu.no/andreas

From: sinte...@googlegroups.com <sinte...@googlegroups.com> on behalf of Muhammad <malmaji...@gmail.com>
Sent: Friday, April 9, 2021 12:07 PM
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: [MRST Users] first trapping example problems
 
--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/94829e08-c65b-4f7b-b681-ceb5d2e75c53n%40googlegroups.com.

Muhammad

unread,
Apr 9, 2021, 11:38:36 AM4/9/21
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Knut-Andreas: 

Thanks for replying promptly. I downloaded the library but still have problems. Do you have any other suggestions I could look at to fix this? It could be that Matlab is not able to compile the necessary mex interface even though when I run downloadMBGL, it says "done" for all three checks. 

Kind Regards, 
Muhammad

Knut-Andreas Lie

unread,
Apr 9, 2021, 11:49:52 AM4/9/21
to Muhammad, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi again,

Try to run the following test:
mrstModule add matlab_bgl
load dfs_example.mat
d = dfs(A,1)
If necessary, you can set a breakpoint inside dfs.m to see what happens. I suspect that there is some problem with the compilation.

 - Knut-Andreas
--
Knut-Andreas Lie, Professor, PhD
Chief Scientist, SINTEF Digital, Mathematics & Cybernetics, Oslo
Phone: +47 930 58 721 (mobile)
http://folk.ntnu.no/andreas

Sent: Friday, April 9, 2021 5:38 PM

To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group <sinte...@googlegroups.com>
Subject: Re: [MRST Users] first trapping example problems
 

Bård Skaflestad

unread,
Apr 9, 2021, 12:03:38 PM4/9/21
to Knut-Andreas Lie, Muhammad, MRST-users: The Matlab Reservoir Simulation Toolbox User Group

Hi,

 

Quick follow-up from what Knut-Andreas suggested earlier.  This may be related to you being on a mac.  Please run the command

 

    mexext

 

on the command line.  If this command returns 'mexmaci64', then that explains your issue since MatlabBGL is compiled only for 32-bit versions of the platform ('mexmaci' or 'mexmac').  Unfortunately, there's very little we can do to help in this case since we—the MRST project—do not control MatlabBGL.  We only provide a convenient package with automatic download for that external software.

 

Sadly, the last time I tried to compile MatlabBGL from source I did not get very far.  It is based on a rather old version of the Boost.Graph library that doesn't really exist anymore.

 

 

Regards,

 

Bård Skaflestad

SINTEF Digital, Mathematics & Cybernetics

Computational Geosciences group

Muhammad

unread,
Apr 9, 2021, 12:28:46 PM4/9/21
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Bård and Knut-Andreas: 

That was exactly the issue. Thanks for the clarification. I found a way around the issue. 

The matlab bgl creater, David Gleich (I think), had posted a version for osx64. Below is the link for mac users: 


I downloaded the library and placed it in the folder. The code now works. 

Thanks for your help guys!
Muhammad
Reply all
Reply to author
Forward
0 new messages