Topic: Trouble Getting Started using Package Manager

I subscribed to Simply Fortran and the Package Manager a few days ago so this is a newbie question.

I wrote a Fortran program and add my own Module with no problem.

I'm having a problem though figuring out what I need to do to reference a package manager package that I installed.

I tried putting one's name in a USE statement in my program but I get the error that it does not see the Module in my project.

I tried the Module browser in the Simply Fortran IDE but if only sees the Moduels that I wrote.

I know that I need to somehow link my project to one of the installed modules but that's where I'm stuck.

I did not see a doc that talks about referencing modules that the package manage installs.

Does that require manually copy some to the installed Module files into my project folder?

If there is a link that documents this process that I have missed, that should get me started.

Re: Trouble Getting Started using Package Manager

The Package Manager installs libraries and, when necessary, module files in an addon directory where Simply Fortran, by default, will search for them when building.  But these modules don't show up in the Module Browser panel.

The usual way to use a package is to start, if possible, with either an example or empty project that the package provides.  However, some provide neither, and you would need to know how to link against it properly.

What package in particular are you attempting to use with your code?  I can probably help you get started quickly if I know what package you'd like to try.

Jeff Armstrong
Approximatrix, LLC

Re: Trouble Getting Started using Package Manager

Hi Jeff,

Thanks for responding to my post.

Right now I am primarily interested in the SQLite package.

One of my primary reasons for purchasing was to migrate a Python (pypy) app that uses SQLite to Fortran to see what kind of additional speedup I could get.

I am also interested to see if any of the other more all purpose packages have any code to help read csv files as my Python application now takes about 45 seconds to load 12 CSV file into an in-memory SQLite database and I'd like to parallelize that part of the code to see if I can get any speedup there.  I am running a SSD to load the data off of but I know that Python pretty much single threads IO because of the GIL.  The CSV files I read have a lot of variable lenght strings in them seperated by the pipe "|" delimiter. 


Re: Trouble Getting Started using Package Manager


You should make sure that you install the Flibs SQLite package, which includes a full Fortran interface to the library.  I believe the library is compiled with the ability to use SQLite in multithread mode without any issues. 

You'll notice that the Flibs SQLite package is marked with: "This package contains an example project for Simply Fortran."  This statement indicates that, after installing, you should see an example project using the Flibs SQLite interface on Simply Fortran's Start tab.  The example is pre-configured with the proper compiler flags to use SQLite.  Basically, though, the Compiler Flags tab in the Project Options window need to have the following entered in "Linker" box:

-lfsqlite3 -lsqlite3

With that change, it should allow you to use the Flibs SQLite package.

To read how the interface works, you'll probably want to look at the documentation.  The documentation is a little frustrating to find.  If you open the SF Package Manager and click the button "Open Managed Files," you can then navigate to the directory:


and read how it works.  It's basically using the same calls as one would use in C.

Jeff Armstrong
Approximatrix, LLC