![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | src/ | 2021-04-29 19:38 | - | |
![]() | Makefile | 2021-04-29 19:38 | 647 | |
![]() | README.html | 2021-04-29 19:38 | 4.7K | |
This is the Fortran implementation of Accelerated DF-SANE published by Birgin and Martínez (2021) with minor modifications.
You can use the Makefile
available in this folder in three ways:
make
make cutest PROBNAME=[problem]
where problem
is a SIF file available in your ${MASTSIF}
folder. For instructions in how to install and configure CUTEst
, follow this link.
src/examples/dfsaneaccma.f90
. Just entermake example
In order to clarify the compilation procedure to whom it may concern, instructions on how to manually compile the code follows. We consider gfortran
compiler and ar
for library generation.
libdfsaneacc.a
The first step consists in generating the library libdfsaneacc.a
to call the function dfsaneacc
. To do this, move to src/dfsaneacc
folder and compile sources as follows:
gfortran -O3 -c -o qr.o qr.f90
gfortran -O3 -c -o dfsaneacc.o dfsaneacc.f90
ar rcs ./lib/libdfsaneacc.a qr.o dfsaneacc.o
The library libdfsaneacc.a
will be generated in src/dfsaneacc/lib
folder.
Consider that you cloned this repository in your computer, and the complete path to dfsaneacc-in-Fortran
folder is ${DFSANEACC}
. To compile the example, for instance (or any other source you written by your own), move into src/examples
folder, compile the main
source by invoking
gfortran -O3 -c -o dfsaneaccma.o dfsaneaccma.f90
and link with the library generated in the previous section by entering:
gfortran -O3 -L${DFSANEACC}/src/dfsaneacc/lib -o dfsaneaccma-example dfsaneaccma.o -ldfsaneacc
With this, the executable file dfsaneaccma-example
will be generated in src/examples
folder.
Don’t remember to follow the installation and environment variables configuration in CUTEst page.
The procedure is very similar to the one shown in previous section. You just need to generate source files for a specific problem and include the CUTEst library when generating the executable file. So, suppose you need to run BOOTH
problem. You need to move into src/interfaces/cutest
directory and
sifdecoder -A ${MYARCH} BOOTH
This will generate four Fortran source files (ELFUN.f
, EXTER.f
, GROUP.f
, and RANGE.f
) and two data files (AUTOMAT.d
and OUTSDIF.d
).
gfortran -O3 -c ELFUN.o ELFUN.f
gfortran -O3 -c EXTER.o EXTER.f
gfortran -O3 -c GROUP.o GROUP.f
gfortran -O3 -c RANGE.o RANGE.f
gfortran -O3 -c dfsaneaccma.o dfsaneaccma.c
libdfsaneacc.a
and libcutest.a
.gfortran -O3 \
-L${DFSANEACCSRC}/src/dfsaneacc/lib -L${CUTEST}/objects/${MYARCH}/double \
-o dfsaneaccma-forcutest $^ -lcutest -ldfsaneacc
E. G. Birgin, J. M. Martínez (2021), Secant acceleration of sequential residual methods for solving large-scale nonlinear systems of equations. Technical Report arXiv:2012.13251v1.