Commit 8552ae77 authored by juan rodriguez-carvajal's avatar juan rodriguez-carvajal
Browse files

Updating files concerned with fpm and mc_mag.f90

parent 287519f2
......@@ -980,7 +980,7 @@
! This Subroutine calls no Subroutine.
!***********************************************************************
integer :: nh, nhp,i,j,k,n,ni,nj,ii,lc
integer :: nh, nhp,i,j,k,n,ni,nj,ii,l
nh=1
nhp=1
......
......@@ -10,7 +10,7 @@ if [%_CHANGE%]==[to_xxx] (
ren CFML_GlobalDeps_Linux_Intel.f90 CFML_GlobalDeps_Linux_Intel.xxx
ren CFML_GlobalDeps_MacOS.f90 CFML_GlobalDeps_MacOS.xxx
ren CFML_GlobalDeps_MacOS_Intel.f90 CFML_GlobalDeps_MacOS_Intel.xxx
ren CFML_GlobalDeps_Windows_gfortran.f90 CFML_GlobalDeps_Windows_gfortran.xxx
ren CFML_GlobalDeps_Windows.f90 CFML_GlobalDeps_Windows.xxx
ren CFML_GlobalDeps_Windows_Intel.f90 CFML_GlobalDeps_Windows_Intel.xxx
ren CFML_GlobalDeps_Windows_Intel64.f90 CFML_GlobalDeps_Windows_Intel64.xxx
ren CFML_HDF5.f90 CFML_HDF5.xxx
......@@ -29,7 +29,7 @@ if [%_CHANGE%]==[to_f90] (
ren CFML_GlobalDeps_Linux_Intel.xxx CFML_GlobalDeps_Linux_Intel.f90
ren CFML_GlobalDeps_MacOS.xxx CFML_GlobalDeps_MacOS.f90
ren CFML_GlobalDeps_MacOS_Intel.xxx CFML_GlobalDeps_MacOS_Intel.f90
ren CFML_GlobalDeps_Windows_gfortran.xxx CFML_GlobalDeps_Windows_gfortran.f90
ren CFML_GlobalDeps_Windows.xxx CFML_GlobalDeps_Windows.f90
ren CFML_GlobalDeps_Windows_Intel.xxx CFML_GlobalDeps_Windows_Intel.f90
ren CFML_GlobalDeps_Windows_Intel64.xxx CFML_GlobalDeps_Windows_Intel64.f90
ren CFML_HDF5.xxx CFML_HDF5.f90
......
......@@ -32,166 +32,166 @@ include-dir = "Src"
# Some executables from Program_Examples
#
#[[executable]]
#name="cryscalcon"
#source-dir="Program_Examples/Cryst_calculator_console"
#main="cryscalc_con.f90"
#
#[[executable]]
#name="hkl_gen"
#source-dir="Program_Examples/hkl_gen"
#main="hkl_gen.f90"
#
#[[executable]]
#name="Formal_Charges"
#source-dir="Program_Examples/BondStr/FormalCharges"
#main="Formal_Charges.f90"
#
#[[executable]]
#name="Bond_Str"
#source-dir="Program_Examples/BondStr/Src"
#main="Bond_Str.f90"
#
#[[executable]]
#name="Similar"
#source-dir="Program_Examples/SimilarityTransformations"
#main="Similar.f90"
#
#[[executable]]
#name="space_group_info"
#source-dir="Program_Examples/SpaceGroups"
#main="space_group_info.f90"
[[executable]]
name="cryscalcon"
source-dir="Program_Examples/Cryst_calculator_console"
main="cryscalc_con.f90"
[[executable]]
name="hkl_gen"
source-dir="Program_Examples/hkl_gen"
main="hkl_gen.f90"
[[executable]]
name="Formal_Charges"
source-dir="Program_Examples/BondStr/FormalCharges"
main="Formal_Charges.f90"
[[executable]]
name="Bond_Str"
source-dir="Program_Examples/BondStr/Src"
main="Bond_Str.f90"
[[executable]]
name="Similar"
source-dir="Program_Examples/SimilarityTransformations"
main="Similar.f90"
[[executable]]
name="space_group_info"
source-dir="Program_Examples/SpaceGroups"
main="space_group_info.f90"
[[executable]]
name="subgroups"
source-dir="Program_Examples/SpaceGroups"
main="subgroups.f90"
#
#[[executable]]
#name="subgroups"
#source-dir="Program_Examples/SpaceGroups"
#main="subgroups.f90"
# Structure factors
#
##
## Structure factors
##
[[executable]]
name="Calc_mSfac"
source-dir="Program_Examples/StructureFactors"
main="Calc_mSfac.f90"
[[executable]]
name="Calc_Sfac"
source-dir="Program_Examples/StructureFactors"
main="Calc_Sfac.f90"
#
#[[executable]]
#name="Calc_mSfac"
#source-dir="Program_Examples/StructureFactors"
#main="Calc_mSfac.f90"
# Structures_GlobalOptimization
#
#[[executable]]
#name="Calc_Sfac"
#source-dir="Program_Examples/StructureFactors"
#main="Calc_Sfac.f90"
[[executable]]
name="GLOpSAnn"
source-dir="Program_Examples/Structures_GlobalOptimization/Src"
main="GLOpSAnn.f90"
#
##
## Structures_GlobalOptimization
##
#[[executable]]
#name="GLOpSAnn"
#source-dir="Program_Examples/Structures_GlobalOptimization/Src"
#main="GLOpSAnn.f90"
#
##
## Metric
##
##[[executable]]
##name="Get_Conv_Cell"
##source-dir="Program_Examples/Metrics"
##main="Get_Conv_Cell.f90"
# Metric
#
#[[executable]]
#name="search_cellrelations"
#name="Get_Conv_Cell"
#source-dir="Program_Examples/Metrics"
#main="search_cellrelations.f90"
#
##
## Magnetic examples, polarimetry
##
#[[executable]]
#name="MagPolar3D"
#source-dir="Program_Examples/Magnetism"
#main="MagPolar3D.f90"
#
##[[executable]]
##name="magref"
##source-dir="Program_Examples/Magnetism"
##main="magref.f90"
#
##[[executable]]
##name="Schwinger"
##source-dir="Program_Examples/Magnetism"
##main="Schwinger.f90"
#
#[[executable]]
#name="Moment"
#source-dir="Program_Examples/Magnetism/Moment"
#main="moment.f90"
#
##[[executable]]
##name="MagOptim"
##source-dir="Program_Examples/Magnetism/MagOptim_v4"
##main="MagOptim.f90"
#
##
## Magnetic package Simbo, EnerMag, Phase_Diagram and MC_Mag
##
#[[executable]]
#name="Simbo"
#source-dir="Program_Examples/Simbo-Enermag"
#main="Simbo.f90"
#main="Get_Conv_Cell.f90"
[[executable]]
name="search_cellrelations"
source-dir="Program_Examples/Metrics"
main="search_cellrelations.f90"
#
#[[executable]]
#name="EnerMag"
#source-dir="Program_Examples/Simbo-Enermag"
#main="EnerMag.f90"
# Magnetic examples, polarimetry
#
[[executable]]
name="MagPolar3D"
source-dir="Program_Examples/Magnetism"
main="MagPolar3D.f90"
#[[executable]]
#name="Phase_Diagram"
#source-dir="Program_Examples/Simbo-Enermag"
#main="Phase_Diagram.f90"
#
#name="magref"
#source-dir="Program_Examples/Magnetism"
#main="magref.f90"
#[[executable]]
#name="MC_Mag"
#source-dir="Program_Examples/Simbo-Enermag/MC_Mag"
#main="mc_mag.f90"
#
##
## Faults Program
##
#name="Schwinger"
#source-dir="Program_Examples/Magnetism"
#main="Schwinger.f90"
[[executable]]
name="Moment"
source-dir="Program_Examples/Magnetism/Moment"
main="moment.f90"
#[[executable]]
#name="DIFFaX2FAULTS"
#source-dir="Program_Examples/Faults/DIFFaX2FAULTS"
#main="DIFFaX2FAULTS.f90"
#name="MagOptim"
#source-dir="Program_Examples/Magnetism/MagOptim_v4"
#main="MagOptim.f90"
#
#[[executable]]
#name="Faults"
#source-dir="Program_Examples/Faults/Src"
#main="Faults.f90"
# Magnetic package Simbo, EnerMag, Phase_Diagram and MC_Mag
#
##
## Powder Patterns
##
#[[executable]]
#name="Simple_Calc_Mag_Powder"
#source-dir="Program_Examples/PowderPattern"
#main="Simple_Calc_Mag_Powder.f90"
[[executable]]
name="Simbo"
source-dir="Program_Examples/Simbo-Enermag"
main="Simbo.f90"
[[executable]]
name="EnerMag"
source-dir="Program_Examples/Simbo-Enermag"
main="EnerMag.f90"
[[executable]]
name="Phase_Diagram"
source-dir="Program_Examples/Simbo-Enermag"
main="Phase_Diagram.f90"
[[executable]]
name="MC_Mag"
source-dir="Program_Examples/Simbo-Enermag/MC_Mag"
main="mc_mag.f90"
#
#[[executable]]
#name="Calc_Powder"
#source-dir="Program_Examples/PowderPattern"
#main="calc_powder.f90"
# Faults Program
#
#[[executable]]
#name="Simple_Calc_Powder"
#source-dir="Program_Examples/PowderPattern"
#main="Simple_calc_powder.f90"
[[executable]]
name="DIFFaX2FAULTS"
source-dir="Program_Examples/Faults/DIFFaX2FAULTS"
main="DIFFaX2FAULTS.f90"
[[executable]]
name="Faults"
source-dir="Program_Examples/Faults/Src"
main="Faults.f90"
#
#[[executable]]
#name="Correct_Cells"
#source-dir="Program_Examples/PowderPattern"
#main="corr_cells.f90"
# Powder Patterns
#
#[[executable]]
#name="Laue_Powder"
#source-dir="Program_Examples/PowderPattern"
#main="Laue_powder.f90"
[[executable]]
name="Simple_Calc_Mag_Powder"
source-dir="Program_Examples/PowderPattern"
main="Simple_Calc_Mag_Powder.f90"
[[executable]]
name="Calc_Powder"
source-dir="Program_Examples/PowderPattern"
main="calc_powder.f90"
[[executable]]
name="Simple_Calc_Powder"
source-dir="Program_Examples/PowderPattern"
main="Simple_calc_powder.f90"
[[executable]]
name="Correct_Cells"
source-dir="Program_Examples/PowderPattern"
main="corr_cells.f90"
[[executable]]
name="Laue_Powder"
source-dir="Program_Examples/PowderPattern"
main="Laue_powder.f90"
NAME
fpm(1) - A Fortran package manager and build system
SYNOPSIS
fpm SUBCOMMAND [SUBCOMMAND_OPTIONS]
fpm --help|--version|--list
DESCRIPTION
fpm(1) is a package manager that helps you create Fortran projects
from source -- it automatically determines dependencies!
Most significantly fpm(1) lets you draw upon other fpm(1) packages
in distributed git(1) repositories as if the packages were a basic
part of your default programming environment, as well as letting
you share your projects with others in a similar manner.
All output goes into the directory "build/" which can generally be
removed and rebuilt if required. Note that if external packages are
being used you need network connectivity to rebuild from scratch.
SUBCOMMANDS
Valid fpm(1) subcommands are:
+ build Compile the packages into the "build/" directory.
+ new Create a new Fortran package directory with sample files.
+ update Update the project dependencies.
+ run Run the local package binaries. defaults to all binaries
for that release.
+ test Run the tests.
+ help Alternate to the --help switch for displaying help text.
+ list Display brief descriptions of all subcommands.
+ install Install project
Their syntax is
build [--profile PROF] [--flag FFLAGS] [--list] [--compiler COMPILER_NAME]
[--tests]
new NAME [[--lib|--src] [--app] [--test] [--example]]|
[--full|--bare][--backfill]
update [NAME(s)] [--fetch-only] [--clean]
run [[--target] NAME(s)] [--profile PROF] [--flag FFLAGS] [--list] [--all]
[--example] [--runner "CMD"] [--compiler COMPILER_NAME] [-- ARGS]
test [[--target] NAME(s)] [--profile PROF] [--flag FFLAGS] [--list]
[--runner "CMD"] [--compiler COMPILER_NAME] [-- ARGS]
help [NAME(s)]
list [--list]
install [--profile PROF] [--flag FFLAGS] [--no-rebuild] [--prefix PATH]
[options]
SUBCOMMAND OPTIONS
-C, --directory PATH
Change working directory to PATH before running any command
--profile PROF selects the compilation profile for the build.
Currently available profiles are "release" for
high optimization and "debug" for full debug options.
If --flag is not specified the "debug" flags are the
default.
--compiler NAME Specify a compiler name. The default is "gfortran"
unless set by the environment variable FPM_FC.
--c-compiler NAME Specify the C compiler name. Automatically determined by
default unless set by the environment variable FPM_CC.
--archiver NAME Specify the archiver name. Automatically determined by
default unless set by the environment variable FPM_AR.
--flag FFLAGS selects compile arguments for the build, the default value is
set by the FPM_FFLAGS environment variable. These are added
to the profile options if --profile is specified, else these
these options override the defaults. Note object and .mod
directory locations are always built in.
--c-flag CFLAGS selects compile arguments specific for C source in the build.
The default value is set by the FPM_CFLAGS environment
variable.
--link-flag LDFLAGS select arguments passed to the linker for the build. The
default value is set by the FPM_LDFLAGS environment variable.
--list List candidates instead of building or running them. On
the fpm(1) command this shows a brief list of subcommands.
--runner CMD Provides a command to prefix program execution paths.
-- ARGS Arguments to pass to executables.
VALID FOR ALL SUBCOMMANDS
--help Show help text and exit
--verbose Display additional information when available
--version Show version information and exit.
@file
You may replace the default options for the fpm(1) command from a
file if your first options begin with @file. Initial options will
then be read from the "response file" "file.rsp" in the current
directory.
If "file" does not exist or cannot be read, then an error occurs and
the program stops. Each line of the file is prefixed with "options"
and interpreted as a separate argument. The file itself may not
contain @file arguments. That is, it is not processed recursively.
For more information on response files see
https://urbanjost.github.io/M_CLI2/set_args.3m_cli2.html
The basic functionality described here will remain the same, but
other features described at the above reference may change.
An example file:
# my build options
options build
options --compiler gfortran
options --flag "-pg -static -pthread -Wunreachable-code -Wunused \
-Wuninitialized -g -O -fbacktrace -fdump-core -fno-underscoring \
-frecord-marker=4 -L/usr/X11R6/lib -L/usr/X11R6/lib64 -lX11"
Note --flag would have to be on one line as response files do not
(currently) allow for continued lines or multiple specifications of
the same option.
ENVIRONMENT VARIABLES
FPM_FC sets the path to the Fortran compiler used for the build,
will be overwritten by --compiler command line option
FPM_FFLAGS sets the arguments for the Fortran compiler
will be overwritten by --flag command line option
FPM_CC sets the path to the C compiler used for the build,
will be overwritten by --c-compiler command line option
FPM_CFLAGS sets the arguments for the C compiler
will be overwritten by --c-flag command line option
FPM_AR sets the path to the archiver used for the build,
will be overwritten by --archiver command line option
FPM_LDFLAGS sets additional link arguments for creating executables
will be overwritten by --link-flag command line option
EXAMPLES
sample commands:
fpm new mypackage --app --test
fpm build
fpm test
fpm run
fpm run --example
fpm new --help
fpm run myprogram --profile release -- -x 10 -y 20 --title "my title"
fpm install --prefix ~/.local
SEE ALSO
+ The fpm(1) home page is at https://github.com/fortran-lang/fpm
+ Registered fpm(1) packages are at https://fortran-lang.org/packages
+ The fpm(1) TOML file format is described at
https://github.com/fortran-lang/fpm/blob/main/manifest-reference.md
Examples of reponse files (within rsp directory) for running fpm with different options
=======================================================================================
File gf_release.rsp
options install --prefix gfortran_release
options --compiler gfortran
options --profile release
options --flag "-ffree-line-length-none -static"
File ifort_release.rsp
options install --prefix ifort_release
options --compiler ifort
options --profile release
File ifx_debug.rsp
options install --prefix ifx_debug
options --compiler ifx
options --profile release
Examples of fpm.toml file for CrysFML
=====================================
name = "CrysFML"
version = "0.1.0"
license = "LGPL"
author = "Juan Rodriguez-Carvajal, Javier Gonzalez-Platas, Nebil A. Katcho"
maintainer = "jrc@ill.eu"
copyright = "Copyright 2022, Juan Rodriguez-Carvajal, Javier Gonzalez-Platas, Nebil A. Katcho"
[build]
auto-executables = false
auto-tests = false
auto-examples = false
[install]
library = true
[library]
source-dir = "Src"
include-dir = "Src"
#
# Some executables from Program_Examples
#
[[executable]]
name="space_group_info"
source-dir="Program_Examples/SpaceGroups"
main="space_group_info.f90"
[[executable]]
name="subgroups"
source-dir="Program_Examples/SpaceGroups"
main="subgroups.f90"
#
# Structure factors
#
[[executable]]
name="Calc_mSfac"
source-dir="Program_Examples/StructureFactors"
main="Calc_mSfac.f90"
[[executable]]
name="Calc_Sfac"
source-dir="Program_Examples/StructureFactors"
main="Calc_Sfac.f90"
......@@ -9,7 +9,7 @@ cd .\Src
call tochange xxx
cd ..
echo ---- Construction of the CrysFML library for 64 bits using gfortran, ifort or ifx (oneAPI) ----
echo ---- The building procedure install also some executable programs of the Program_Examples subdirectory
echo ---- The building procedure installs also some executable programs of the Program_Examples subdirectory
echo Default: ifort compiler in release mode. Equivalent to the first example below
echo Usage: make_CrysFML ifort
echo make_CrysFML ifort debug
......@@ -38,9 +38,9 @@ rem > Arguments ----
ren CFML_GlobalDeps_Windows_Intel.xxx CFML_GlobalDeps.f90
cd ..
if [%_DEBUG%]==[Y] (
fpm @ifort_debug
fpm @./rsp/ifort_debug
) else (
fpm @ifort_release
fpm @./rsp/ifort_release
)
cd .\Src
ren CFML_GlobalDeps.f90 CFML_GlobalDeps_Windows_Intel.xxx
......@@ -51,9 +51,9 @@ rem > Arguments ----
ren CFML_GlobalDeps_Windows_Intel.xxx CFML_GlobalDeps.f90
cd ..
if [%_DEBUG%]==[Y] (
fpm @ifx_debug
fpm @./rsp/ifx_debug
) else (
fpm @ifx_release
fpm @./rsp/ifx_release
)
cd .\Src
ren CFML_GlobalDeps.f90 CFML_GlobalDeps_Windows_Intel.xxx
......@@ -61,18 +61,17 @@ rem > Arguments ----
)
if [%_COMP%]==[gfortran] (
cd .\Src
ren CFML_GlobalDeps_Windows_gfortran.xxx CFML_GlobalDeps.f90
ren CFML_GlobalDeps_Windows.xxx CFML_GlobalDeps.f90
cd ..
if [%_DEBUG%]==[Y] (
fpm @gf_debug
fpm @./rsp/gf_debug
) else (
fpm @gf_release
fpm @./rsp/gf_release
)
cd .\Src
ren CFML_GlobalDeps.f90 CFML_GlobalDeps_Windows_gfortran.xxx
ren CFML_GlobalDeps.f90 CFML_GlobalDeps_Windows.xxx
cd ..
)
rem
rem Undo the changes of extensions to be compatilbe with Cmake
rem
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment