Commit 063ef421 authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

Compilation fixes

parent 7ba10f3b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -14,12 +14,12 @@ testLapack.o: ./testLapack.cpp Makefile Makefile.dep
testLapack: testLapack.o  Makefile Makefile.dep
	$(CXX) -o testLapack testLapack.o $(LDFLAGS)

Makefile.dep: ./integrator.cpp ./sparseSolverTest.cpp ./testCRSMatrix.cpp ./combineContinuedFraction.cpp ./continuedFractionCollection.cpp  ./range.cpp ./kernelPolynomial.cpp ./linearPrediction.cpp ./options.cpp ./randomTest.cpp ./svd.cpp ./testLapack.cpp ./threads.cpp ./loadImbalance.cpp ./testIsClass.cpp ./testMemResolv1.cpp ./sumDecomposition.cpp ./calculator.cpp ./closuresTest.cpp ./base64test.cpp ./checkRunId.cpp ./testLanczos.cpp
	$(CXX) $(CPPFLAGS) -I../src -I.. -MM  ./integrator.cpp ./sparseSolverTest.cpp ./testCRSMatrix.cpp ./combineContinuedFraction.cpp ./continuedFractionCollection.cpp ./range.cpp ./kernelPolynomial.cpp ./linearPrediction.cpp ./options.cpp ./randomTest.cpp ./svd.cpp ./testLapack.cpp ./threads.cpp ./loadImbalance.cpp ./testIsClass.cpp ./testMemResolv1.cpp ./sumDecomposition.cpp ./calculator.cpp ./closuresTest.cpp ./base64test.cpp ./checkRunId.cpp ./testLanczos.cpp   > Makefile.dep
Makefile.dep: ./integrator.cpp ./sparseSolverTest.cpp ./testCRSMatrix.cpp ./combineContinuedFraction.cpp ./continuedFractionCollection.cpp  ./range.cpp ./kernelPolynomial.cpp ./linearPrediction.cpp ./options.cpp ./randomTest.cpp ./svd.cpp ./testLapack.cpp ./threads.cpp ./loadImbalance.cpp ./testIsClass.cpp ./sumDecomposition.cpp ./calculator.cpp ./closuresTest.cpp ./base64test.cpp ./checkRunId.cpp ./testLanczos.cpp
	$(CXX) $(CPPFLAGS) -I../src -I.. -MM  ./integrator.cpp ./sparseSolverTest.cpp ./testCRSMatrix.cpp ./combineContinuedFraction.cpp ./continuedFractionCollection.cpp ./range.cpp ./kernelPolynomial.cpp ./linearPrediction.cpp ./options.cpp ./randomTest.cpp ./svd.cpp ./testLapack.cpp ./threads.cpp ./loadImbalance.cpp ./testIsClass.cpp ./sumDecomposition.cpp ./calculator.cpp ./closuresTest.cpp ./base64test.cpp ./checkRunId.cpp ./testLanczos.cpp   > Makefile.dep

.PHONY: clean
clean: Makefile.dep
	rm -f core* *.o *.dep *.a integrator sparseSolverTest testCRSMatrix combineContinuedFraction continuedFractionCollection range kernelPolynomial linearPrediction options randomTest svd testLapack threads loadImbalance testIsClass testMemResolv1 sumDecomposition calculator closuresTest base64test checkRunId testLanczos
	rm -f core* *.o *.dep *.a integrator sparseSolverTest testCRSMatrix combineContinuedFraction continuedFractionCollection range kernelPolynomial linearPrediction options randomTest svd testLapack threads loadImbalance testIsClass sumDecomposition calculator closuresTest base64test checkRunId testLanczos

include Makefile.dep
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ sub createMakefile
	my @drivers = qw(integrator sparseSolverTest testCRSMatrix combineContinuedFraction
	continuedFraction continuedFractionCollection range kernelPolynomial fit
	linearPrediction options randomTest svd testLapack threads loadImbalance testIsClass
	testMemResolv1 sumDecomposition calculator closuresTest base64test checkRunId
	sumDecomposition calculator closuresTest base64test checkRunId
	testLanczos testExcitedLanczos testLanczosMatrixInFile nested testIoNg testIoNgBoolean
	affinityTest testPredicate isBlasThreaded testParallelizer2 testGemmR testGemmR2
	testParallelSvd internode);
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ use Make;
my @drivers = qw/integrator sparseSolverTest testCRSMatrix minimizer
                 combineContinuedFraction continuedFractionCollection range
                 kernelPolynomial linearPrediction options randomTest svd
		 testLapack threads testIsClass testMemResolv1 sumDecomposition
		 testLapack threads testIsClass sumDecomposition
		 calculator closuresTest base64test testIoNg fit/;
my $fh;
open($fh, ">", "Makefile") or die "$0: Cannot open Makefile for writing\n";

drivers/testMemResolv1.cpp

deleted100644 → 0
+0 −47
Original line number Diff line number Diff line
#include <iostream>
#include <cstdlib>
#include "TestMemResolv1.h"
#include <unistd.h>

typedef TestMemResolv1<int> TestMemResolv1Type;

void recover()
{
	std::cout<<"From disk\n";
	PsimagLite::String filename = "test10.mem";
	PsimagLite::MemResolv mresolv(filename,"TestMemResolv1<int>");
	std::cout<<mresolv;

	TestMemResolv1Type* ptr = reinterpret_cast<TestMemResolv1Type*>(mresolv.get());
	std::cout<<"From disk: "<<ptr->get(1)<<"\n";
}

void save(TestMemResolv1Type* ptr)
{
	PsimagLite::MemResolv mresolv(ptr);
	void* ptrCopy = mresolv.dup();
	std::cout<<"copy= "<<ptrCopy<<"\n";

	TestMemResolv1Type* TestMemResolv1 = (TestMemResolv1Type*) ptrCopy;
	std::cout<<TestMemResolv1->get(1)<<"\n";

	mresolv.save("test10.mem","TestMemResolv1<int>");
}

int main(int argc, char *argv[])
{
	if (argc < 2) return 1;
	int n = atoi(argv[1]);
	if (n < 2) return 1;

	TestMemResolv1Type* ptr = new TestMemResolv1Type(n);
	TestMemResolv1Type& mytest = *ptr;
	mytest.setTo(10);
	std::cout<<mytest.get(1)<<"\n";

	save(ptr);
	delete ptr;
	sleep(1);
	recover();
}
+1 −1
Original line number Diff line number Diff line
////////////////////////////////////////////////////////////////////////////////
// The Loki Library
// Copyright (c) 2005 by Peter Kmmel
// Copyright (c) 2005 by Peter K\"mmel
// Permission to use, copy, modify, distribute and sell this software for any 
//     purpose is hereby granted without fee, provided that the above copyright 
//     notice appear in all copies and that both that copyright notice and this 
Loading