Commit 0d69e7e7 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Merge branch 'wrap_output' into 'master'

Wrap SPHERE output

See merge request giacomo.mulas/np_tmcode!77
parents a30decb8 894efdcd
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -200,6 +200,11 @@ sanity_stage:
      - chmod +x test_inclusion_outputs
      - valgrind --leak-check=full --log-file=valgrind_inclusion.log ./test_inclusion_outputs
      - grep "0 errors from 0 contexts" valgrind_inclusion.log
      - rm -rf c_OINCLU
      - chmod +x test_sphere_outputs
      - valgrind --leak-check=full --log-file=valgrind_sphere.log ./test_sphere_outputs
      - grep "0 errors from 0 contexts" valgrind_sphere.log
      - rm -rf c_OSPH
      
running_stage:
   stage: run
@@ -230,7 +235,7 @@ running_stage:
      - cd ../sphere
      - echo "Running np_sphere"
      - chmod +x np_sphere
      - ./np_sphere
      - OMP_NUM_THREADS=1 ./np_sphere
      - cd ../cluster
      - echo "Running np_cluster"
      - chmod +x np_cluster
@@ -308,4 +313,9 @@ testing_stage:
      - export FFILE=../../test_data/inclusion/OINCLU
      - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OINCLU
      - rm -rf c_OINCLU
      - chmod u+x test_sphere_outputs
      - ./test_sphere_outputs
      - export FFILE=../../test_data/sphere/OSPH
      - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OSPH
      - rm -rf c_OSPH
      
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ Distributing the code and its sources is possible under the terms of the GNU GPL
- Saija et al. 2001, ApJ, 559, 993, DOI:10.1086/322350
- Borghese, Denti, Saija 2007, Scattering from Model Nonspherical Particles (ISBN 978-3-540-37413-8), DOI:10.1007/978-3-540-37414-5

*NOTE:* The building process requires a working installation of a C++ and a FORTRAN compiler. Many solutions are available, but the recommended option is the *GNU Compiler Collection* `gcc` with the addition of `g++` and `gfortran`. The parallel code implementation further requires the use of parallel compilers complying with the MPI standard (*OpenMPI*, *MPICH*).
*NOTE:* The building process requires a working installation of a C++ and a FORTRAN compiler. Many solutions are available, but the recommended option is the *GNU Compiler Collection* `gcc` with the addition of `g++` and `gfortran`. Single-workstation multi-threaded parallelism is supported through _OpenMP_, while the multi-node code implementation further requires the use of parallel compilers complying with the _MPI_ standard (_OpenMPI_, _MPICH_).

# Acknowledgments

+5 −2
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@ NP_SPHERE_BINS=sphere/np_sphere
NP_TRAPPING_SRCS=../src/trapping/np_trapping.cpp ../src/trapping/cfrfme.cpp ../src/trapping/clffft.cpp
NP_TRAPPING_OBJS=../src/trapping/np_trapping.o ../src/trapping/cfrfme.o ../src/trapping/clffft.o
NP_TRAPPING_BINS=trapping/np_trapping
NP_TESTING_OBJS=../src/testing/test_cluster_outputs.o ../src/testing/test_inclusion_outputs.o ../src/testing/test_ParticleDescriptor.o ../src/testing/test_TEDF.o ../src/testing/test_TTMS.o
NP_TESTING_BINS=testing/test_cluster_outputs testing/test_inclusion_outputs testing/test_ParticleDescriptor testing/test_TEDF testing/test_TTMS
NP_TESTING_OBJS=../src/testing/test_cluster_outputs.o ../src/testing/test_inclusion_outputs.o ../src/testing/test_sphere_outputs.o ../src/testing/test_ParticleDescriptor.o ../src/testing/test_TEDF.o ../src/testing/test_TTMS.o
NP_TESTING_BINS=testing/test_cluster_outputs testing/test_inclusion_outputs testing/test_sphere_outputs testing/test_ParticleDescriptor testing/test_TEDF testing/test_TTMS

all: $(NPTM_LIB) $(FORTRAN_BINS) $(NP_CLUSTER_BINS) $(NP_INCLUSION_BINS) $(NP_SPHERE_BINS) $(NP_TRAPPING_BINS) $(NP_TESTING_BINS)

@@ -89,6 +89,9 @@ testing/test_cluster_outputs: $(NPTM_LIB) ../src/testing/test_cluster_outputs.o
testing/test_inclusion_outputs: $(NPTM_LIB) ../src/testing/test_inclusion_outputs.o
	$(CXX) $(CXXFLAGS) ../src/testing/test_inclusion_outputs.o -o $@ $(CXXLDFLAGS)

testing/test_sphere_outputs: $(NPTM_LIB) ../src/testing/test_sphere_outputs.o
	$(CXX) $(CXXFLAGS) ../src/testing/test_sphere_outputs.o -o $@ $(CXXLDFLAGS)

testing/test_TEDF: $(NPTM_LIB) ../src/testing/test_TEDF.o
	$(CXX) $(CXXFLAGS) ../src/testing/test_TEDF.o -o $@ $(CXXLDFLAGS)

+543 −7

File changed.

Preview size limit exceeded, changes collapsed.

+18 −17
Original line number Diff line number Diff line
@@ -70,8 +70,9 @@ extern void cluster(const string& config_file, const string& data_file, const st
 * \return result: `int` An exit code passed to the OS (0 for succesful execution).
 */
int main(int argc, char **argv) {
  int ierr = 0;
#ifdef MPI_VERSION
	int ierr = MPI_Init(&argc, &argv);
  ierr = MPI_Init(&argc, &argv);
  // create and initialise class with essential MPI data
  mixMPI *mpidata = new mixMPI(MPI_COMM_WORLD);
#else
@@ -91,5 +92,5 @@ int main(int argc, char **argv) {
  MPI_Finalize();
#endif
  delete mpidata;
	return 0;
  return ierr;
}
Loading