Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[sundials-users] How to create my own applications based on the given examples?

6 views
Skip to first unread message

Wu, Xueyang

unread,
Aug 28, 2024, 12:54:49 PM8/28/24
to SUNDIAL...@listserv.llnl.gov
Hello,

I am wondering how to build my own executables based on the examples available. For example, in examples/arkode/F2003_custom, there is one application named ark_brusselator1D_f2003. I could modify the f90 file itself, re-build and run my modified version. However, if I want to keep the original ark_brusselator1D_f2003, and write multiple f90 files with different modifications, what would be the easiest way to do so? Thank you.

Best,
Xueyang

Xueyang Wu

 

Postdoctoral Research Associate

MST-8/Materials Science in Radiation & Dynamics Extreme 

Los Alamos National Laboratory

 

pronouns: She/Her



To unsubscribe from the SUNDIALS-USERS list: write to: mailto:SUNDIALS-USERS-...@LISTSERV.LLNL.GOV

Brorson, Stuart

unread,
Aug 28, 2024, 1:33:04 PM8/28/24
to SUNDIAL...@listserv.llnl.gov
I don't know how extensive your mods will be, but if they're just simple replacement of a few strings, then the easiest hack would be to write a shell script which copies the original file to a new name, uses sed to replace the strings, then invokes your favorite compiler to create an executable with a similar name.  Shell scripts are your friend for things like this.

Stuart



From: sundial...@llnl.gov <sundial...@llnl.gov> on behalf of Wu, Xueyang <00002b6241396c8...@LISTSERV.LLNL.GOV>
Sent: Wednesday, August 28, 2024 12:32 PM
To: SUNDIAL...@LISTSERV.LLNL.GOV <SUNDIAL...@LISTSERV.LLNL.GOV>
Subject: [sundials-users] How to create my own applications based on the given examples?
 

Reynolds, Daniel

unread,
Aug 29, 2024, 6:09:50 PM8/29/24
to SUNDIAL...@listserv.llnl.gov

Hi Xueyang,

 

It takes a small amount of CMake expertise, but once you have SUNDIALS installed then you should be able to make a folder with your [multiple] .f90 files, along with a CMakeLists.txt file that uses CMake’s “find_package” function to specify your dependence on SUNDIALS.

 

Let me know if you’d like an example of this, and I can look around for something to send to you directly.

 

Daniel R. Reynolds (he/him)

Professor, SMU Mathematics

214-768-4339

https://people.smu.edu/dreynolds/

 

 

From: sundial...@llnl.gov <sundial...@llnl.gov> on behalf of Wu, Xueyang <00002b6241396c8...@LISTSERV.LLNL.GOV>
Date: Wednesday, August 28, 2024 at 11:55
AM
To: SUNDIAL...@LISTSERV.LLNL.GOV <SUNDIAL...@LISTSERV.LLNL.GOV>
Subject: [sundials-users] How to create my own applications based on the given examples?

Reply all
Reply to author
Forward
0 new messages