Permalink
Browse files

Added make_table_weakrates executable to simplify

preprocessor use in the make_table_* binaries
  • Loading branch information...
csullivan committed Nov 4, 2015
1 parent 5a842fc commit bc2cc0e42978ca8daa49d0021dd7ab3e0e7c72d8
View
@@ -22,3 +22,4 @@ HDF5LIBS=-L$(HDF5DIR)/lib -lhdf5 -lhdf5_fortran -lhdf5 -lz
#additional flag needed to include other's work, like Hempel's EOS or Timmes' Helmholtz EOS
NUCLEI_HEMPEL = 0
HELMHOLTZ_EOS = 0
WEAK_RATES = 0
View
@@ -1,8 +1,8 @@
# ####### EOS parameters #######
eos_table_name = "/user/sullivan/gr1d/GitHub/NuLib/src/extra_code_and_tables/Hempel_SFHoEOS_rho222_temp180_ye60_version_1.1_20120817.h5"
eos_table_name = "./src/extra_code_and_tables/Hempel_SFHoEOS_rho222_temp180_ye60_version_1.1_20120817.h5"
####### Weak interaction parameters #######
directory = "/projects/ceclub/gr1dnulib/GitHub/NuLib/src/weakrates/tables/"
directory = "./src/weakrates/tables/"
lmp_rates = "lmprates.dat"
lmsh_rates = "lmshrates.dat"
oda_rates = "odarates.dat"
View
@@ -79,10 +79,11 @@ EXTRADEPS += requested_interactions.inc constants.inc
EXTRAINCS += $(HDF5INCS)
EXTRAOBJECTS += $(HDF5LIBS)
all: nulib.a ../nulibtable_driver ../point_example ../make_table_example test
ifeq ($(WEAK_RATES),1)
all: nulib.a ../nulibtable_driver ../point_example ../make_table_weakrates
else
all: nulib.a ../nulibtable_driver ../point_example ../make_table_example
endif
../nulibtable_driver: $(EXTRADEPS) $(NT_OBJECTS) $(F_OBJECTS)
$(F90) $(F90FLAGS) $(DEFS) $(MODINC) $(EXTRAINC) -o $@ nulibtable_driver.F90 $(NT_OBJECTS) $(EXTRAOBJECTS)
@@ -93,6 +94,9 @@ all: nulib.a ../nulibtable_driver ../point_example ../make_table_example test
../make_table_example: $(EXTRADEPS) $(F_OBJECTS) $(OBJECTS) make_table_example.F90
$(F90) $(F90FLAGS) $(DEFS) $(MODINC) $(EXTRAINCS) -o $@ make_table_example.F90 $(OBJECTS) $(F_OBJECTS) $(EXTRAOBJECTS)
../make_table_weakrates: $(EXTRADEPS) $(F_OBJECTS) $(OBJECTS) make_table_weakrates.F90
$(F90) $(F90FLAGS) $(DEFS) $(MODINC) $(EXTRAINCS) -o $@ make_table_weakrates.F90 $(OBJECTS) $(F_OBJECTS) $(EXTRAOBJECTS)
nulib.a: $(EXTRADEPS) $(F_OBJECTS) $(OBJECTS) $(NT_OBJECTS)
ar -r nulib.a *.o
@@ -117,6 +121,7 @@ nuc_eos/nuc_eos.a: nuc_eos/*.F90 nuc_eos/*.f
clean:
rm -rf ../make_table_example
rm -rf ../make_table_weakrates
rm -rf ../point_example
rm -rf ../nulibtable_driver
rm -rf test
View
@@ -4,9 +4,6 @@ program make_table_example
use nulib
use inputparser
use nuclei_hempel
#if WEAK_RATES
use weakrates_interface
#endif
implicit none
#ifdef __MPI__
include 'mpif.h'
@@ -119,14 +116,6 @@ program make_table_example
#if NUCLEI_HEMPEL
call set_up_Hempel !set's up EOS for nuclear abundances
#endif
#if WEAK_RATES
if (add_nue_emission_weakinteraction_ecap.or.add_anue_emission_weakinteraction_poscap) then
call initialize_weakratelib(parameters_filename)
else
stop "The WEAK_RATES preprocessor flag is set, but no weak interactions are requested. &
Did you forget to turn them on in requested_interactions.inc?"
endif
#endif
outdir="./"
base="NuLib"
@@ -252,16 +241,10 @@ program make_table_example
recvcount,mpi_double,0,mpi_comm_world,ierror)
mpi_final_table_size_rho = recvcount
#endif
#if WEAK_RATES
!$OMP PARALLEL DO PRIVATE(itemp,iye,local_emissivity,local_absopacity,local_scatopacity, &
!$OMP ns,ng,eos_variables,keytemp,keyerr,matter_prs,matter_ent,matter_cs2,matter_dedt, &
!$OMP matter_dpderho,matter_dpdrhoe,hempel_lookup_table)
!loop over rho,temp,ye of table, do each point
#else
!$OMP PARALLEL DO PRIVATE(itemp,iye,local_emissivity,local_absopacity,local_scatopacity, &
!$OMP ns,ng,eos_variables,keytemp,keyerr,matter_prs,matter_ent,matter_cs2,matter_dedt, &
!$OMP matter_dpderho,matter_dpdrhoe)
#endif
#ifdef __MPI__
do irho=1,mpi_final_table_size_rho
#else
Oops, something went wrong.

0 comments on commit bc2cc0e

Please sign in to comment.